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

Home » Public Forums » archive » Re: Widget event handlers
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: Widget event handlers [message #24071 is a reply to message #23986] Fri, 02 March 2001 13:26 Go to previous message
Joe Means is currently offline  Joe Means
Messages: 44
Registered: November 1996
Member
Thanks to Marc and David for your helpfull ideas. I was indeed
identifying the event handler with Event_func keyword, so using
Event_pro solved my first problem. I found the /Kbrd_focus_events
keyword met my needs better than /All_events. Now the info structure is
being updated but I do not need the TRANSLATEAXIES_EVENT procedure.
Joe Means

Marc Schellens wrote:

> Joe Means wrote:
>
>> In a widget program [TranslateAxies] I am writing I specify an event
>> handler function for each widget that can generate an event. I specify
>> event handlers for each text and button widget but not for base and
>> label widgets [no bases are resizeable]. No base widgets can be
>> resized. The GUI includes text boxes for user input. When I ran the
>> program initially, put text in any box and clicked enter, I always got
>> the error:
>> Attempt to call undefined procedure/function: 'TRANSLATEAXIES_EVENT'.
>>
>> So I put a do-nothing procedure with this name in the
>> TranslateAxies_EventCB file. Now I do not get the error. Also, all the
>> text widgets and their event functions seem to run fine [when I click
>> return after entering a value in the text field], because their values
>> in the info structure are updated OK.
>>
>> It does not seem like I need this do-nothing proceedure. Can anyone
>> tell me why it is needed?
>>
>> Also, when I type text in a text widget it will not call the event
>> function to update the value in the info structure if I click tab to
>> move out of the field. Why is this?
>
>
> You probably use EVENT_FUNC and return the event at the end, in wich
> case the next
> eventhandler in the eventhandler-tree is called (and so on, earlier or
> later
> 'TRANSLATEAXIES_EVENT').
> So use EVENT_PRO or don't return anything from
> your EVENT_FUNC (even the latter is not best style, but works).
>
> Regarding your second question, just set /ALL_EVENTS keyword in your
> widget_text function. Then the eventhandler is called after every change
> in the widget, keeping your info structure always up to date.
>
> cheers,
> marc


--
Joseph E. Means
Assistant Professor, joe.means@orst.edu
Department of Forest Science
Oregon State University
Corvallis, OR 97331-5752
541-750-7351
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Communication between different widget bases
Next Topic: Registering CT and MRI volumes

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

Current Time: Sat Oct 11 01:34:19 PDT 2025

Total time taken to generate the page: 0.72498 seconds