Re: Test

Petasis Gewrgios (ph1566@rea.edu.physics.uch.gr)
Thu, 21 Nov 1996 16:22:49 -0600 (CST)

To subscribers of the xforms list from Petasis Gewrgios <ph1566@rea.edu.physics.uch.gr> :

>
> > I have a form that has a xyplot and a hidden button over it, in order
> > to exit form if you click on it.
> > The button does not have a callback.
> > I create multiple instances of the form, but when clicked any of them,
> > they disappear in reverse order. For example if i open three instances
> > and i click the first, the therd disappears. I suppose that this is the
> > right thing to happen, since fl_do_forms() will return there it was
> > last requested... Can anyone help me, what is the correct way to
> > treat ths problem???
>
> I'm not sure I understand what you're trying to do here, but I think
> your interpretation of the fl_do_forms() return is incorrect.
>
> spl
>
Sorry, I didn't make clear whats happening...
I'm making a sort of a calculator (something like xcalc but objects in this form
have callbacks, exept from the "done" button. When returned, i hide and free the
form. After that I display a form to enter the xrange etc... Again everything has
works differently,
anyway) and i have the main form, with the display, buttons etc.
All objects have callbacks, exept from the menu entry file, which only has an
exit command. I have a button to create simple plots. When pressed, i display
a form in which you can enter the function to be plotted. All objects in this form
have callbacks, exept from the "done" button. When returned, i hide and free the
form. After that I display a form to enter the xrange etc... Again everything has
a callback exept the "ok" button and i hide/free this form as soon as it returns.
After that i display the actual form of the plot, which contains a xyplot object
(no interaction) and a hidden button over it. The button does not have a callback.
What i want to do is when user clicks in the plot, form to disappear. The code in
the callback of "plot" button of the main form loks like:
/* display form "enter function" */
fl_do_forms();
/* some checking */
fl_do_forms();
/* some checking */
/* display form "plot properties"*/
fl_do_forms();
/* some checking */
/* calculate arrays to be plotted */
/* display form "plot itself" */
fl_do_forms();
/* hide - free "plot form" */
return();
/* end of callback */
The following warks ok if there is only one plot. The main form is not
deactivated, so the user can create another plot pushing the "plot button" while
the previous is still visible. Everything works ok and the second plot appears in
screen. (This works allways, and is not affected by number of plots). The ploblem
is that when user clicks in -for example- the first plot created, the last plot
displayed disappears. I believe that this happen because of the callback, because
fl_do_form() will return in the callback where it was last called. (I dont know
if you can understand but im afraid i cannot express it correctly -I hope you do!-
sorry...) Obviously this way is not the proper one when you have multiple instances
of a form (although it works for only one form). What i am asking is whs ?
( It may look silly, but can i add a callback in the hidden button that hides -
frees form from the callback??? And if yes, how can i know the which form to
hide as i get only the object???)
How can anyone handle multiple instances of forms in xforms lib??
(I hope you understand because my english suffers !!!)
at is
a more proper way to handle this ?
( It may look silly, but can i add a callback in the hidden button that hides -
frees form from the callback??? And if yes, how can i know the which form to
hide as i get only the object???)
How can anyone handle multiple instances of forms in xforms lib??
(I hope you understand because my english suffers !!!)
Thanks in advance...
Gewrgios Petasis,
Physics Department Of University of Creete
Heraklion, Creete

To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html