Re: XForms: deactivate button

Lothar Esser (esser@chop.swmed.edu)
Mon, 21 Sep 1998 22:13:47 -0500 (CDT)

# To subscribers of the xforms list from Lothar Esser <esser@chop.swmed.edu> :

Dear Dave,

>
> Am I using the fl_deactivate_object() improperly? I have four buttons set
> up, when button 3 is pushed, I would like to deactivate button 2. I used
> the fdesign program to create the form and both the callback name and
> button name are the same.
>
> In the calback function for button3 I use
> if(fl_get_button(ob))
> fl_deactivate_object(button2); /* button2 name I entered in fdesign
>
> I get the compile error.
> warning: passing arg 1 of `fl_deactivate_object' from incompatible pointer
> type.
> and it core dumps when button3 is pressed.

You said that the name of the button was the same as the callback ? Well
then the compiler should not compile the program but if it did it is
possible that button2 is not a FL_OBJECT * but an address of the callback
! This would explain the compiler message and the coredump during run
time. Try being very specific and define different names for objects and
callbacks (like button3 for the object and button3_cb for the callback).

Hope this helps.

Lothar

------------------------------------------------------------------
Dr. Lothar Esser
Howard Hughes Medical Institute
5323 Harry Hines Blvd.
Dallas Texas 75235-9050
E-mail : esser@chop.swmed.edu
------------------------------------------------------------------

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