Re: Object method compiling [message #29348] |
Wed, 13 February 2002 07:37 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Harald Jeszenszky (harald.jeszenszky@oeaw.ac.at) writes:
>
> I have tried to put the <object>__define routine last in the file but
> it didn't work even when resetting the IDL session (Run->Reset). After
> terminating and starting the IDL session again it worked.
Reset->Run would have been better. But I think you
have things sorted now. :-)
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
|
|
|
Re: Object method compiling [message #29350 is a reply to message #29348] |
Wed, 13 February 2002 07:28  |
harald.jeszenszky
Messages: 2 Registered: February 2002
|
Junior Member |
|
|
I have tried to put the <object>__define routine last in the file but
it didn't work even when resetting the IDL session (Run->Reset). After
terminating and starting the IDL session again it worked.
Thank you for the tip
Harald
|
|
|
Re: Object method compiling [message #29360 is a reply to message #29350] |
Wed, 13 February 2002 05:27  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Harald Jeszenszky (harald.jeszenszky@oeaw.ac.at) writes:
> I have defined an object and all methods are located in the same
> <object>__define.pro file. When I create a new instance of the object
> for the first time, the routine <object>__define is compiled and the
> method <objects>::INIT is executed properly. When destroying the
> object the <objects>::CLEANUP routine is executed. All other methods
> are not compiled and therefore unknown to IDL.
It sounds to me like the <object>__define module is
not the LAST module in the file, as it should be.
Otherwise, it is hard to imagine how anything like
this could happen. Remember, in automatic compilation,
IDL will search through and compile modules UNTIL it
gets the module with the right name. If this is the
LAST module, all is well. If it is not, then all the
modules below this module in the file cannot be found.
You want to get all your modules compiled when you
create the object (I.e., execute the <object>__define module.)
> Is there a way to automatically compile all other methods of the
> object (e.g. by using RESOLVE_ROUTINE in the <object>__define
> rountine)?
This really should not be required if the object code is
structured properly. Beyond putting the <object>__define module
last in the file, I typically assemble the rest of the modules
alphabetically (so I can find them easily), but all this is
completely arbitrary and up to 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
|
|
|
Re: Object method compiling [message #29362 is a reply to message #29360] |
Wed, 13 February 2002 05:00  |
Gert Van de Wouwer
Messages: 21 Registered: January 2002
|
Junior Member |
|
|
try .reset and recompile
"Harald Jeszenszky" <harald.jeszenszky@oeaw.ac.at> wrote in message
news:3c6a4421.93011703@news.oeaw.ac.at...
> Hi,
>
> I have defined an object and all methods are located in the same
> <object>__define.pro file. When I create a new instance of the object
> for the first time, the routine <object>__define is compiled and the
> method <objects>::INIT is executed properly. When destroying the
> object the <objects>::CLEANUP routine is executed. All other methods
> are not compiled and therefore unknown to IDL.
>
> Is there a way to automatically compile all other methods of the
> object (e.g. by using RESOLVE_ROUTINE in the <object>__define
> rountine)?
>
> Many thanks in advance
> Harald
>
|
|
|