comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: global singleton object ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: global singleton object ? [message #26916 is a reply to message #26902] Tue, 02 October 2001 08:55 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G.S. (rgs1967@hotmail.com) writes:

> partly inspired by the recent threads on global variables,
> I have a question regarding a global object.
>
>
> I have an IDL process that will run independently on several
> different computers. So, I need a method of deciding what
> computer and operating system I'm on, and defining various
> filepaths etc. So I have written an object with methods such
> as "->getfilepath". This method determines the computer name, and
> returns the appropriate info. There are several methods, for different
> read and write paths, and different data sets. The actual information is
> hardcoded into the object definition.
>
> So, I currently create the object and kill the object deep in each
> basic read/write function, but I would much rather have one instance
> of the object (i.e. the singleton object) that can be seen everywhere.
> (I've used this approach many times in labview, and it is really handy).
> I actually thought that objects were supposed to be of that scope, but
> I guess I got confused with the Labview nonreentrant vis.
>
> So, is there a way to easily define the object, or do I simply create it
> upon startup of my IDL and define it to a system variable?

Oh, oh. Pavel, where are you?

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using IDL with Java
Next Topic: Re: happy palindrome day - and a challenge

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 02:19:38 PDT 2025

Total time taken to generate the page: 1.35597 seconds