XForms: Fselector's return callback

Veronica Sexton (vsexton@sonetcom.com)
Sat, 25 Apr 1998 16:50:49 -0500

# To subscribers of the xforms list from "Veronica Sexton" <vsexton@sonetcom.com> :

Hello,
I have been using file selectors in an xforms program, which I am
converting from another (unnamed) XWindows-based gui library. In
calling my file selector, I wanted my callback to be called when a user
selected a file name, either by double-clicking, or by typing in the
name and pressing 'Enter'. This is a fairly standard combination. I
set my callback to the file selector by using fl_set_fselector_callback.
I soon discovered that
I had a file browser that calls my callback when a file name is
double-clicked, but when
a file name is entered in the input box and 'Return' is pressed, the
'Dismiss' button is
activated, thus canceling the file selector. Is this a result of my
setting the callback to the browser? Should I approach this another
way, such as using the return value for fl_show_fselector? For now, I
have disabled the 'Return' shortcut for the dismiss button, and put it
to an appbutton. However, the file selector now does not hide
immediately, instead, it shows my appbutton being depressed, hides my
appbutton, then hides. I do
remove the appbutton in my code, because I use different appbutton
labels and callbacks in varios places. However, I do not remove the
appbutton until much later in the code than hiding the file selector.
The demo, pmbrowser, has the same kind of behavior. I tried it on both
IRIX 5.3 and Linus 2.xx (two versions).
I feel that if there is an input field on a form, then IT should
receive the 'Return' keystroke by default, since this is a common
behavior across window managers and platforms. Is this intended to
respond this way?
Thanks for any input.

Veronica Sexton

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/