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

Home » Public Forums » archive » Re: Prob with classes, widgets and event handler
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: Prob with classes, widgets and event handler [message #32932 is a reply to message #32931] Wed, 20 November 2002 02:30 Go to previous messageGo to previous message
Sebastian Loebbert is currently offline  Sebastian Loebbert
Messages: 12
Registered: September 2002
Junior Member
On 19 Nov 2002 savoie@pleasenospam.nsidc.org wrote:

Hi,

thanks a lot, not returning 1 in INIT was the problem. I had a look at my
"Buidling IDL apps" and they only say "INIT should return scalar TRUE",
but they don't say anything about objects being not valid...

> Don't fear, this is a pretty common mistake. Your init function needs to
> return 1 to be a valid object. [Didn't you take out a red pen and underline
> that in your IDL Programming Techniques (Second Ed.) :) ]
>

That's exactly what I've been looking for, but the code is wrong:
In the event handler, it must be (contrary to my intuition)
Call_Method, cmd.method, cmd.object, event


> <fanning>
> button = Widget_Button(bbase, Value='Quit', $
> UVALUE={object:self, method:'Quit'})
>
> All the event handler does is get the user value and dispatch the
> event to this method of this object:
>
> PRO EVENTHANDLER, event
> Widget_Control, event.id, Get_UValue=cmd
> Call_Method, cmd.object, cmd.method, event
> END
>
> </fanning>
>


Best regards,

Sebastian
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Opensource ASCII data merging/management?
Next Topic: Re: CAT, DOG, 1.7 AND FISH IN IDL - SUPPLEMENTAL

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

Current Time: Sat Oct 11 16:27:30 PDT 2025

Total time taken to generate the page: 1.51802 seconds