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

Home » Public Forums » archive » Mark Rivers object example
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Mark Rivers object example [message #9339] Fri, 20 June 1997 00:00
Ronn Kling is currently offline  Ronn Kling
Messages: 3
Registered: June 1997
Junior Member
Greetings,

While playing with Mark Rivers object example I noticed some interesting
behavior. As he mentions in his example, Xmanager can't have the main
event handler be an object method, but the event_pro keyword can! Here
is my version of Mark's example.

;Begin example---------------------------------------------

function example::init
base = widget_base(uvalue=self,xsize=100,ysize=100)
void = widget_button(base,value='exit',event_pro='example::event')
widget_control,base,/realize
xmanager,'example::init',base,/no_block
return,1
end

pro example::event
;no need for an event variable, the implicit self is the event
;structure!!!
widget_control,self.top,/destroy
end

pro example__define
data = fltarr(30)
t = {example,data:data}
end

;end example---------------------------------------------------

I have only tried this out on an alpha, but if this really is a feature
of 5.0 then it opens up some interesting programming possibilities.

-Ronn Kling
Ronn Kling Consulting
[Message index]
 
Read Message
Previous Topic: Re: ishft(-32768,-1) = 2147467264 ?
Next Topic: Re: Calling IDL with C or C++

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

Current Time: Fri Oct 10 14:09:37 PDT 2025

Total time taken to generate the page: 1.19766 seconds