Re: XForms: how to handle DBLCLICK and not CLICK in a {pre,post}handler ?

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 17 Sep 98 12:44:08 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> BTW, although the dbclick timeout-setting function is mentioned in the
> manuals and declared in the header, the default value is not stated anywhere.

>From forms.h:

#define FL_CLICK_TIMEOUT 400 /* double click interval */

This is mentioned, albeit obliquely, in the manual section on Free
objects.

> An elegant solution, as usual, except that I want the single_click()
> function to do whatever the original button handler did, which I
> presume means I have to:
>
> fl_set_button (button_obj, on_or_off);
> fl_call_object_callback (button_obj, whatever);
>
> from within the single_click() routine, *and* I have to manage its
> "on-or-offness" too. Is there a shortcut around this - some way to say
> "I want a single click to work just the regular button handler thinks
> it should ?" ...

I don't see how, since the single click handler has to some how
prospectively "know" that it has been actuated by a single click.

What you'll probably end up doing is creating a new button object.
Fortunately, there's a fair amount of example material in the manual
on how to do this. Given the prehandler() I discussed in the previous
email on this subject, you're probably 95 percent of the way there.

If I feel inspired later on this evening I might take a crack at it,
just for giggles.

spl

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