# To subscribers of the xforms list from Jeff Pierce <wd4nmq@comcast.net> :
Yep, that fixed the problem.
But, one thing. Why does the input object have focus when it is another
button that was clicked and whose callback hid the form.?
Shouldn't the input object have lost focus when the button was clicked?
The problem only happened AFTER text was typed in to the input object
the first time, or you simply clicked the input object andd entered no
text. After that, redisplaying the form causes the app to crater unless
you exit by <return> in teh input object.
Why is an input object's callback called in this instance and not a
button's in the same form? Why is the input object special?
For what now is happening, it seems that that xforms is saying is, "If
you EVER gave focus to an input object, it's callback is going to be
called when you hide, etc. the form forever more."
What if there are multiple input objects each with it's own callback?
Will each of these callbacks get called when the form is hidden because
at sometime each had focus?
IMHO this is a bug. The input object's callback should never be called
automatically, unless it was it's action, i.e. <return> key.
I am not trying to be difficult or throw stones. I like xforms and have
used it on several projects. I am just looking at this from an
application developers point of view.
Angus Leeming wrote:
> # To subscribers of the xforms list from Angus Leeming <angus.leeming@btopenworld.com> :
>
> On Sunday 13 April 2003 5:25 pm, Jeff Pierce wrote:
>
>>It seems that the fl_hide_form is trying to ASSUME what I want to do and
>>is forcing what that on my code.
>>
>>Shouldn't this be considered a bug?
>
>
> The relevant code snippet from fl_hide_form is probably this
>
> if (form->focusobj != NULL)
> {
> obj = form->focusobj;
> fl_handle_object(form->focusobj, FL_UNFOCUS, 0, 0, 0, 0);
> fl_handle_object(obj, FL_FOCUS, 0, 0, 0, 0);
> }
>
> fl_handle_object puts obj on a stack of objects whose callback is to be
> invoked. So...
>
> does it help if you set form->focusobj = 0 before you invoke fl_hide_form?
>
> Angus
>
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuhs.mil or see
> http://bob.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://world.std.com/~xforms
> List Archive: http://bob.usuhs.mil/mailserv/list-archives/
> Development: http://savannah.nongnu.org/files/?group=xforms
>
-- Jeff, wd4nmq wd4nmq@comcast.net http://mywebpages.comcast.net/wd4nmq_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuhs.mil or see http://bob.usuhs.mil/mailserv/xforms.html XForms Home Page: http://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/ Development: http://savannah.nongnu.org/files/?group=xforms
This archive was generated by hypermail 2b29 : Sun Apr 13 2003 - 16:51:39 EDT