Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > fsc_inputfield ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 5564 of 6020
Post > Topic >>

fsc_inputfield question re compound widgets

by markb77@[EMAIL PROTECTED] Mar 22, 2008 at 02:14 PM

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
 




 3 Posts in Topic:
fsc_inputfield question re compound widgets
markb77@[EMAIL PROTECTED]  2008-03-22 14:14:14 
Re: fsc_inputfield question re compound widgets
markb77@[EMAIL PROTECTED]  2008-03-22 14:47:43 
Re: fsc_inputfield question re compound widgets
David Fanning <news@[E  2008-03-22 15:59:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 17:11:27 CDT 2008.