Re: fsc_inputfield question re compound widgets [message #59328] |
Sat, 22 March 2008 14:59  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark Bates writes:
> My basic question is whether this is a
> bug in FSC_Inputfield or whether I'm simply using it the wrong way?
You are using it the wrong way, of course. :-)
Call_Method has nothing to do with it. That is only used
internally because the guts of FSC_INPUTFIELD is an object.
What happens is that the main event handler (which is really
just an event dispatcher) is written as a function. The
event handlers it calls (methods) are also written as functions.
These functions (TextEvents is one of them) create an
event structure if you have specifically used either EVENT_PRO
or EVENT_FUNCT when you created the widget.
So, bottom line, if you have used either of these
keywords, an FSC_INPUTFIELD_EVENT is created and returned.
If you didn't use these keywords, a zero is returned.
Assuming an FSC_INPUTFIELD_EVENT is being returned, the
event "bubbles up" from the widget that caused the event
to the "top-level" base widget of the FSC_INPUTFIELD
compound widget. This is the widget I have assigned
your event handler to (the one you passed with EVENT_FUNC.)
When the event gets into this base widget, it is passed
directly to your event handler. What you do with it after
that is really none of my business.
Small tests here can't get anything like what you describe
to happen. If I had to venture a guess, I would say you might
be doing something funky with the event after I pass it to you.
But, in any case, based on the evidence so far, I feel about
85% confident this is no bug in FSC_INPUTFIELD. But I'm always
open to being contradicted by further evidence. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|