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

Home » Public Forums » archive » Re: Technique for "method_missing" in IDL objects
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: Technique for "method_missing" in IDL objects [message #67255 is a reply to message #67254] Fri, 17 July 2009 11:07 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Paul van Delst writes:
>
>> I'm stringing together a bunch of different objects into a container. When I define
>> objects I always define an "Inspect" method so I can have a lookee at the internals of the
>> objects (like the ruby inspect method). However, the inspect method for the container
>> simply loops over the objects that have been placed in it calling their inspect methods.
>> So, if I reach an object that does not have an inspect method, is there a technique to
>> pre-determine if I can even call the method to avoid the
>>
>> % Attempt to call undefined procedure/function: 'OBJ::INSPECT'
>>
>> error that I get?
>>
>> Ruby provides a "method_missing" method to enable one to handle this sort of thing. Does
>> IDL have any sort of equivalent? Looking at the various ROUTINE_INFO, RESOLVE_ROUTINE
>> help, they don't appear to be that reliable.
>
> OBJ_HASMETHOD might work:
>
> http://www.dfanning.com/code_tips/hasmethod.html

Ah! Perfect. That's exactly what I was looking for!

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: shapeinfo
Next Topic: Understanding GPD Files

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

Current Time: Sat Oct 11 04:48:06 PDT 2025

Total time taken to generate the page: 0.71905 seconds