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

Home » Public Forums » archive » fsc_inputfield question re compound widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
fsc_inputfield question re compound widgets [message #59332] Sat, 22 March 2008 14:14
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
Hi,

I'm writing a compound widget that makes use of David's
FSC_Inputfield, which is itself a compound widget. I'm running into
some problems with the event handling...

Here's what's going on. My compound widget (let's call it cw_parent)
has its own event handler, cw_parent_event_handler. When I initialize
the FSC_Inputfield I specify the cw_parent_event_handler in the
EVENT_FUNC keyword of FSC_INPUTFIELD.

When I click on the FSC_inputfield widget in my cw_parent widget, it
generates an event that gets handled by cw_parent_event_handler. So
far so good. What cw_parent_event_handler does is return a different
type of event .. let's say a cw_parent_event structure. What I expect
to happen is for this event to bubble up the hierarchy to the next
level, and be handled by the event handler for the program that
created the cw_parent compound widget. Instead, what happens is that
the event that was returned by cw_parent_event_handler gets sent back
to cw_parent_event_handler again!

I think what's going on is that the initial event is generated by a
call_method call in FSC_Inputfield_Event_Handler(). After this event
is processed by the cw_parent_event_handler, it returns a
cw_parent_event, which bubbles up the hierarchy and is caught by the
event handler that is defined for the top level base of the
FSC_Inputfield compound widget, which is again
cw_parent_event_handler, and so the event gets sent back there
again.

I know this must be very confusing to read -- I'll try to put some
sort of example code together. My basic question is whether this is a
bug in FSC_Inputfield or whether I'm simply using it the wrong way?
The "event coming back twice" behaviour goes away if I remove the
assignment of the event_func keyword during the creation of the top
level base in the sourcecode of FSC_Inputfield, seemingly without
breaking any of its functionality..?

thanks,
Mark Bates
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: retrieve list of files using ftp
Next Topic: Re: fsc_inputfield question re compound widgets

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

Current Time: Wed Oct 08 17:34:07 PDT 2025

Total time taken to generate the page: 0.00472 seconds