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

Home » Public Forums » archive » Re: event_pro for compound widgets -- fsc_field issues and handler field
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: event_pro for compound widgets -- fsc_field issues and handler field [message #40908] Thu, 09 September 2004 05:31 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Benjamin Hornberger writes:

> Is there a reason that fsc_field will handle all events internally
> unless event_pro or event_func are specified? Which means, it's not
> possible to have events "bubble up" the hierarchy directly (or is it?).

Oh, it is probably possible. I just have never used
field widgets that would do that, so it never occurred
to me to implement the capability. I prefer dumb fields
that just collect information. When I am interested in
what is in the fields I inquire of them directly, test the
values, etc. Otherwise, the only event I could possibly
imagine being interested in is a Carriage Return. But you
could certainly modify FSC_FIELD to "bubble" events to
the parent.

> I am using fsc_fields in my compound widget and want to have their
> events handled by the CW's base's event handler. It is important that
> event.handler is that base's ID because I store the CW's internal
> variables in the first child's user value (as recommended by the IDL
> help) and I access that in the event handler by
> widget_info(event.handler, /child). If I specify the event handler for
> the fsc_fields directly (using the same function as for the CW's base),
> event.handler will be wrong.

My first thought, if I were trying to work around this, would
be to put the ID of the widget I wanted to find in the FSC_FIELD
user value. Then, in the assigned event handler, I could just look
in the user value of event.id for the "handler" widget.

> Currently, I am working around by specifying an
> event_func='fsc_field_event' for all fsc_fields, which reads
>
> FUNCTION fsc_field_event, event
> return, event
> END
>
> which will make the fsc_fields handle their events externally while
> having the event bubble up the hierarchy (yes, I understood the point
> you were describing above!). That works, but seems a little ugly.

Yes, well if the author was writing for others more than he was
writing for himself, he would probably think more about these issues
in advance. As it is, there are only 24 hours in a day. :-)
>
> Ok, since I have a workaround it's not serious. I was just wondering why
> fsc_field behaves like that.

Laziness, basically. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Colour tables in linux (and default setting of retain)
Next Topic: IQM Image processing tool

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

Current Time: Fri Oct 10 17:58:07 PDT 2025

Total time taken to generate the page: 1.44068 seconds