Re: XForms: getting the name of a form

Sat, 6 Jun 1998 23:27:14 -0300 (ADT)

# To subscribers of the xforms list from AMIT BHATNAGAR <> :

> > When i receive an object in a callback, I want to preform different
> > functions depending on which form the object belonged to.
> >
> > I don't want to have a different callback for each form. ...
> Why? What possible advantage could there be to consolidating
> callbacks into one in this case. You either have a large number of
> callbacks or you have giant, ugly, switch statments.

The reason: Every input field on every form has to write to the same
pipe.. therefore it makes sence to have every input field call the same
callback. So this callback doesn't need to know what form it's object
belonged to. However, I would also like to set a text box's label
corresponding on what input field and form is active.

I will probably still have the single callback to handle all of the input
fields write to my pipe, however I will have to create a pre-emptive
handler for all of my forms to sucessfully set the label upon FL_ENTER.
This will involve writing 10 seperate preemptive handlers, each contaning
cases on which input field is active. So its still messy.

I just thought it would be easier having it all into 1 callback..(somehow)

Question: How do I set a form to have no object focused? Do i have to
manually know what input field gets defaulted to be focused, and then
unfocus it? Or is there a simpler way?

To unsubscribe, send the message "unsubscribe" to or see
XForms Home Page:
List Archive: