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

Home » Public Forums » archive » Re: Method Overrides
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: Method Overrides [message #80413 is a reply to message #80405] Mon, 04 June 2012 12:49 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/4/12 1:20 PM, Matthew Argall wrote:
> Hi,
>
> I have a set of IDL objects and am running into method overriding
> problems at run-time. Any time I invoke a sub-class at run-time
> without explicitly compiling it before-hand, the class definition
> method gets compiled and executed, but not the over-riding methods.
> The super-class's methods still get used.
>
> All methods are in the same file before/above the object definition
> method (__define), so I thought they would be compiled and recognized
> at the same time, but apparently not as I expected.

This should work as you are expecting.

> At run-time, I see
> % Compiled module: CLASS__DEFINE
>
> But if I compile it myself
> IDL> .compile class__define
> % Compiled module: CLASS__DEFINE::METHOD1
> % Compiled module: CLASS__DEFINE::METHOD2
> % Compiled module: CLASS__DEFINE::METHOD3
> % Compiled module: CLASS__DEFINE

Are you using "compile_opt hidden" in the methods? Otherwise, I'm not
sure why this would be from what you are describing. Are you sure you
are getting the correct source code file, not an old one? Use "help,
/source" to see what has been compiled in your current IDL session.

> Could some one explain to me a little more clearly when or in which
> order to compile sub-classes and super-classes? Every time I use an
> over-riding method, do I either have to compile it or use the "obj ->
> classname::method" syntax to ensure that I get the right one?

You shouldn't ever have to manually compile things if you have named
them correctly. You also shouldn't have to use obj->classname::method
unless you are trying to get the superclasses' method.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: interpolate
Next Topic: Re: INTERPOLATE Function

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

Current Time: Tue Dec 02 10:19:11 PST 2025

Total time taken to generate the page: 1.44011 seconds