# To subscribers of the xforms list from Serge B Bromow <serge@omensys.com> :
David Scriven wrote:
> # To subscribers of the xforms list from David Scriven <davidwriter@yahoo.com> :
>
> I've come across something weird with the slider.
> If you don't have a callback or as in my case, the
> program goes and does something before returning, the
> slider will abort the program.
>
It does not abort the program, it simply falls out
of the "fl_do_forms" loop and exits.
>
> To see this effect take the demo objreturn.c and
> comment out line 87
> fl_set_object_callback(obj,return_cb,(long)"slider
> returned");
>
> then move the slider - the program aborts when you
> stop. It appears that the callback is necessary, even
> if it is a blank. If the slider is changed to a
> scrollbar, the program works well without a callback.
>
No all object return, but simply change state.
This is the nature of object oriented programing. If you
wish to treat the objects in a more linear programing
model you could try the following in the "main" program;
while(TRUE) {
ob = fl_do_forms();
if( ob == fd_obj->slider ) {
do someting (or nothing) here;
continue;
}
}
Any returning objects that do not have callbacks
will be trapped in your loop.
Hope this helps
Serge
>
> I'm running 0.89.6 on Red Hat Linux 7.2
>
> Any comments?
>
> ______________________________________________________________________
> Web-hosting solutions for home and business! http://website.yahoo.ca
> _________________________________________________
> 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/
_________________________________________________
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/
This archive was generated by hypermail 2b29 : Wed May 01 2002 - 13:54:14 EDT