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

Home » Public Forums » archive » Re: 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
Re: fsc_inputfield question re compound widgets [message #59328] Sat, 22 March 2008 14:59
David Fanning is currently offline  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.")
Re: fsc_inputfield question re compound widgets [message #59330 is a reply to message #59328] Sat, 22 March 2008 14:47 Go to previous message
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
Ok, there's no bug in FSC_Inputfield.. I solved my own problem.

What I had done was to put several widgets, including two
FSC_Inputfield widgets in a base for which an event_func was defined.
I had also defined the event func keyword for each of the
FSC_Inputfield widgets, because without doing this those widgets will
not return any events. It was this double specification of the event
handler that caused the problem. The solution is to specify
event_func for each of my widgets individually, rather than for the
base that contains them. OR, add a keyword to FSC_Inputfield so that
it will return events even when event_func and event_pro are left
undefined.

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

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

Current Time: Wed Oct 08 11:43:27 PDT 2025

Total time taken to generate the page: 0.00626 seconds