Re: XForms: Demo dirlist, comes with distribution

Christopher Sean Hilton (chris@vindaloo.com)
Thu, 12 Mar 1998 13:17:51 -0500 (EST)

# To subscribers of the xforms list from Christopher Sean Hilton <chris@vindaloo.com> :

On Thu, 5 Mar 1998, Thomas L. Gossard wrote:

: # To subscribers of the xforms list from "Thomas L. Gossard" <tgossard@ix.netcom.com> :
:
: Steve,
:
: Sorry I'm so late in replying. Thanks for the info. It may take a bit
: getting used to, but I'll live. Seems somewhat circular to me, like
: having a structure point to itself by way of a "medium". Thanks again
: for your help.
:

It seems circular until you want to have multiple instances of a forms
displayed at the same time and you need to differentiate them in a
callback. Let's assume that you have a form with a 'toggle active' button.
Pressing the toggle active button on an instance should cause certain
objects on that instance of the form to be switch between active and
inactive. In this case you'll need to have all the objects you want to
toggle named in fdesign so you get a pointer to them in the FD_*
structure. Then when you write your callback for the button you can simply
declare a variable in your callback like this:

void MyCallback(OBJECT *obj, long foo)
{
FD_FORM * Form = obj->form->fdui;

...

and you have access to all the objects that you named in the FD_*
structure for this instance of the form through the Form pointer.

Chris

--
      __o          "All I was trying to do was get home from work."
    _`\<,_           -Rosa Parks
___(*)/_(*)____.___o____..___..o...________ooO..._____________________
Christopher Sean Hilton                    [chris/at/vindaloo/dot/com]

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