Re: data to/from stack

Scott Raney ((no email))
Tue, 11 Apr 1995 18:26:10 -0600 (MDT)

>
> Hello Meta-users,
>
> I have developed a dialog box (a stack with 1 card to change settings).
>
> I know I can use global variables, but...
> can I pass arguments to a stack when I "go to" it?
> can I return data from a stack when it closes (to the calling script)?
>
> More specifically, I have a dialog box/stack that allows the user to build
> a query to a database (like an SQL statement builder) so the user can get a
> subset of data to work with.

Using a global variable is the most common way to do this. There is
no way to pass data to a stack, but you *can* return data from a stack
opened as a modal dialog box. The results of last statement executed
in a closeCard or closeStack handler can be retrieved with "the
result" in the statement after the "modal" or "go xxxx as modal"
statement in the script that opens the dialog.

For example, put the following handler into the stack script of a
stack "md":

on closeStack
return "some string"
end closeStack

Putting this handler into a button script and clicking on it will then
put "some string" into the Message Box:

on mouseUp
modal "md"
put the result
end mouseUp

> Any help/experience would be appreciated,
> Chris
> --
> +--------------------+--------------------------------------------------+
> | Chris Roger | Laboratory / Patient Information Systems |
> | LabConnect, Inc. | Xenix => ascii terminals (phasing out) |
> | croger@gcr.com | Linux => X-Windows/Motif |
> +--------------------+--------------------------------------------------+
> Quality in a service or product is not what you put into it. It is what
> the customer gets out of it. -Peter Drucker
>
>

-- 
***********************************************************************
* Scott Raney  303-447-3936            Remember: the better you look, *
* raney@metacard.com                   the more you'll see -- Lidia   *
***********************************************************************