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

Home » Public Forums » archive » Object Oriented programming question
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: Object Oriented programming question [message #15155 is a reply to message #15080] Fri, 23 April 1999 00:00 Go to previous messageGo to previous message
mallors is currently offline  mallors
Messages: 76
Registered: November 1997
Member
In article <372074A1.3FD713D7@astro.estec.esa.nl>,
>
> Oh that's pretty simple (sorry I shouldn't say this ;-) - a good
> way to see how is the file lib/trackball__define.pro
>
> at definition of an object like trackball, the ::init method
> is called which may be defined in such a way that you can specify
> required and optional parameters - remember that you set the
> object using self.(whatever...)
>
> it is a very good (and probably the only) way to have all object
> related methods in one file like the above examples trackball_define.pro
> follow stricktly the order:
> a) first arbitrary methods specialized for this object only
> b) typical, more general methods (SetProperty, GetPro....
> c) the init method
> d) finally, the define method
>
> IDL does then the rest - if you need another example like
> creating a complete atom by a set of objects starting from
> simple spheres, mail me (only an example, not fully done)


There is no problem defining object methods each in their
own files. For larger objects with many methods, I prefer
to put each method in its own file, and let IDL's automatic
compilation do the rest. Objects can be defined in the file
"obj__define.pro", and methods in "obj__method1.pro",
"obj__method2.pro", etc.

The only thing to watch our for is under case-sensitive
operating systems, you must name your files in all lower case,
although within IDL you can use case. For example, I might
have the object method called "plotData", which would be placed
in the file "obj__plotdata.pro". But for the implementation,
I would typically write

PRO obj::plotData
.
.
.
END



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
Robert S. Mallozzi 256-544-0887
Mail Code ES 84
Work: http://www.batse.msfc.nasa.gov/ Marshall Space Flight Center
Play: http://cspar.uah.edu/~mallozzir/ Huntsville, AL 35812
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: WIDGET_TABLE does not allow editing
Next Topic: Better Fitting routine

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

Current Time: Wed Dec 03 09:17:53 PST 2025

Total time taken to generate the page: 2.07807 seconds