Re: XForms: callback's

AMIT BHATNAGAR (amit@cs.dal.ca)
Thu, 16 Jul 1998 00:14:31 -0300 (ADT)

# To subscribers of the xforms list from AMIT BHATNAGAR <amit@cs.dal.ca> :

> I tried it and it worked as expected for me. The only thing which
> works in an unexpected manner is if you don't set FL_RETURN_END then
> if the cursor is in the input object and you hit return without making
> a change, then the focus moves on to the next object. Setting
> FL_RETURN_END with fl_set_input_return() fixes that.

hmm.. remember.. I do not want the focus to change if the string doesn't
match. for example.. this is what I have been trying:

[...]
strcpy (buffer, fl_get_input (obj))
if (!strcmp (buffer, "key") /* strcmp returns 0 if they match */
{
blah
}
else
{
fl_show_onliner (error stuff);
fl_reset_focus (obj);
}
}

now this callback does have its input return as FL_RETURN_END...

what happens is that if it fails the strcmp.. it shows the oneliner and
then puts the focus onto the next input obj, which is not what I want it
to do. It shouldn't leave the input field untill the strcmp is okay.

_________________________________________________
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/