s-news
[Top] [All Lists]

Re: [Getting GUI Dialog box to dissapear before function ends]

To: Greg Snow <snow@fisher.byu.edu>, s-news@lists.biostat.wustl.edu
Subject: Re: [Getting GUI Dialog box to dissapear before function ends]
From: ROGER NGOUENET <r.f.ngouenet@usa.net>
Date: 15 Dec 00 14:07:27 MST

Hi Greg,

I had the same problem last week. guiLocator() (check the helpfile)
should help. The trick I used was to set the argument nPoints to
0... 

I hope you are having fun @ BYU!

Roger.
Greg Snow <snow@fisher.byu.edu> wrote:

I am using S-PLUS 2000 release 3. 

I have a function that does some interactive graphics (produces a plot
then waits for me to click on the plot to add some lines).  It works fine
as is.  I also created a GUI interface (Menu item and dialog box) to go
with it.  Everything works fine except that when I run the function via
the dialog, the dialog box stays on top while my graph is waiting to be
clicked on (obscuring the graph, not able to move the box out of the
way).  Once I have finished with the graph, then the dialog box
dissapears.

Does anybody have any ideas of what I can do to make the dialog box
disappear (or at least not be always on top) before running the function?

One plan that I tried was to write another function to just gather the
arguments from the dialog box and store them in frame 1, then write
another function that would call up the dialog with the first function
using guiDisplayDialog, then call my original function passing in the
arguments from frame 1.  The idea was that the function that the dialog is
associated with would finish, the dialog box would dissapear, then my
function would run after the box was gone.  The only problem is that
guiDisplayDialog runs, creates the dialog, but then returns before I have
finished using the dialog, so the function goes ahead and runs the next
part, even though the dialog and associated function have not put the data
on frame 1 yet.  It should work if I could find a way to have my function
wait until the dialog box has finished its work before continueing to the
next line.  (there is a bModal option to guiDisplayDialog that may do
something, but I have not understood any of the sparse documentation on
it).

So if anybody knows how to either get the dialog box to dissapear (maybe
add something to the callback function) or to have a function wait for a
dialog to finish its call before continuing, I would appreciate any ideas.

Thanks,


-- 
---------------------------------------------------------------------
 Dr. Gregory L. Snow         |  Inertia makes the world go round, 
     (Greg)                  |   Love makes the trip worth taking.
   gls@byu.edu               |
---------------------------------------------------------------------

---------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Getting GUI Dialog box to dissapear before function ends], ROGER NGOUENET <=