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

Home » Public Forums » archive » Re: Lions and tiger and objects, oh my!
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: Lions and tiger and objects, oh my! [message #63362 is a reply to message #63173] Tue, 04 November 2008 13:31 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Nov 3, 9:48 am, David Fanning <n...@dfanning.com> wrote:

> I've never used these routines, nor can I find them, but
> I imagine they are designed to do exactly the same thing:
> throw widget events and callbacks into the object system.

Yep - I got them from the IDL code library. They use a uvalue to get
the object and then call the appropriate method. I associate a base
with each object (shades of read_interfile here) and set up the
event_pro like this:

widget_control, self.base, set_uvalue=self,
event_pro='generic_class_event'
xmanager, 'generic_class', self.base, /no_block

The generic_class_event routine looks like this:

; June, 2001 : JLP, RSI
Pro Generic_Class_Event, Event
COMPILE_OPT STRICTARR
Widget_Control, Event.Handler, Get_UValue = oSelf
If (N_elements(oSelf) eq 1) then Begin
If (Obj_Valid(oSelf)) then Begin

;; A class that uses this routine must have a method
;; named "::EVENT".
oSelf->Event, Event
EndIf
EndIf
End

so it calls the event method of the object. And similarly for the
notify methods.

>> Also, is it really called CatEventHandler?  I don't see
>> it anywhere in my copy of the sources...
>
> No, it is called CatEventDispatcher. I call it by some
> other name to throw would-be users completely off the
> track :-(

It worked :-) I'll take a look.


Thanks, Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: segment vector with missing data
Next Topic: Re: Moving to objects loses array functionality?

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

Current Time: Sat Nov 29 20:41:19 PST 2025

Total time taken to generate the page: 0.14286 seconds