Refresh on close

Jan Schenkel janschenkel at yahoo.com
Mon Jun 28 12:20:27 EDT 2010


--- On Mon, 6/28/10, Andrew Kluthe <andrew at rjdfarm.com> wrote:
> 
> What do you figure the best method for refreshing the
> datagrid on a stack
> that launches a modal after the modal closes?
> 
> for instance,
> 
> You click add person on a stack.
> The add person modal shows.
> You add some people.
> You click Exit on the modal.
> The Datagrid in the first stack refreshes to show the new
> data.
> 
> The problem is this add person modal might arrive from many
> different
> stacks. How would I target specifically what I want to
> refresh on the modals
> close?
> -- 
> 

As you said, the modal editor can be opened from different stacks, so the most logical place would be to call the 'refresh' code right after the 'modal' command that opens your editor stack - when the modal dialog is closed, the original script will resume after the 'modal' command.

If you want to update all the open 'Persons' datagrids throughout your applmication, you'll have to find some way to register the datagrids and dispatch a refresh to all of their 'caretakers'.

Jan Schenkel.
=====
Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)



      




More information about the use-livecode mailing list