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

Home » Public Forums » archive » OOP Programming, Was: Something Else
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: OOP Programming, Was: Something Else [message #11226 is a reply to message #11057] Fri, 06 March 1998 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
Just one thing about this kind of solution (from Mark Rivers):

> pro mca_display_event, event ; event processing for MCA application
>
> widget_control, event.top, get_uvalue = mca_display
> mca_display->event, event
> end

I realize(d) (after I started to write this message :-) that this is
the event processing for the entire application.... But for compound
widgets, etc, it is customary (and a good custom, too!) to leave
the compound widget ID's UVALUE to the "owner's" discretion. Thus,
in general, it is wise to store the object pointer on the uvalue
of the *first child* of the event.id.

I.e., in a compound widget event *function* (allowing the event to be
modified and sent further up the hierarchy, or being gobbled up by
sending along a zero value) one should do something like (untested
code follows!):

function cw_object_event,event
widget_control,widget_info(event.id,/child),get_uvalue=objec t
return, object->event_func(event)
end

The observant reader will of course have noticed that if this
scheme is followed *consistently*, you only need *one* event
function (outside the individual class scopes, that is!) for
*all* of your "objectified" compound widget types!!

Neat, if I may say so myself.

Darn, why can't I have some time to spend actually *doing* this
OO stuff, instead of just writing about it!

Regards,

Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: OOP Programming, Was: Something Else
Next Topic: New US dollar coin design generated using IDL

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

Current Time: Fri Oct 17 23:55:11 PDT 2025

Total time taken to generate the page: 0.48113 seconds