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

Home » Public Forums » archive » Re: _extra and call_method
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: _extra and call_method [message #42326] Tue, 01 February 2005 07:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Tupper writes:

> Just got to thinking on this some more. Here's one item I thought you might be
> willing to share your thoughts on: in the case of multiple inheritances does
> each keyword get checked in for each generation of inheritance and if they do,
> does it matter?
>
> For example...
>
> PRO APPENDAGE__DEFINE, class
> class = {APPENDAGE, isJointed:0}
> END
>
> PRO LEG__DEFINE, class
> class = {ARM, INHERITS APPENDAGE, hasOpposingThumb: 0}
> END
>
>
> So, if I use the generic keyword checking for LEG does "isJointed" get checked
> twice? Propbably it doesn't matter a hoot if they do get checked twice.
>
>
>
> PRO LEG::SetProperty, _EXTRA = extra
>
> ... do that neat keyword checking thing here ...
>
> self->APPENDAGE::SetProperty, _Extra = extra
> END

The generic methods short-circuit the normal chaining of
keywords through SetProperty methods (could be a bad thing,
I guess, in the wrong hands) by setting the structure field
of self directly. If the field is there, it gets set. End of
story.

Of course, not all properties act this way. Sometimes when you
set one property, you are obliged to set others, etc. This
mechanism doesn't help with that, and, in fact, probably shouldn't
be used if you are doing things like that.

I use the generic methods mostly for quick and dirty objects,
or for when I am in the "development as thinking" stage of a
project. For the real-deal objects, I prefer to define the keywords,
since then I have the chance to document them. Makes it easier for
the end-user. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Aggregating an array
Next Topic: Color behavior when using TEXTURE MAP

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

Current Time: Sun Oct 12 13:23:09 PDT 2025

Total time taken to generate the page: 1.67866 seconds