Dialog Stack Design Questions

Paul Gabel paulgabel at comcast.net
Wed Feb 20 11:59:22 EST 2008

Len and Robert:

Another solution is to designate one card in your stack as the dialog  
card, title it "Information," and place a field, a Cancel button, and  
an OK button on it. Then place the dialog information into the field  
by script as shown below. This method is very flexible and conserving  
of resources.

global theOK

on linkClicked -- linked text in this particular case
   put 2 into theOK
   put "--------------------" into field "Info" of card "Information"
   go card "Information"
   wait while theOK = 2 with messages
   if theOK = 1 then go recent card -- occurs when the user clicks on  
the OK button on card "Information"
end linkClicked

In the OK button on card "Information" include the handler:

global theOK

on mouseUp
   put 1 into theOK
end mouseUp

On Feb 20, 2008, at 7:32 AM, Robert Brenstein wrote:

> On 20/02/08 at 07:58 -0600 Len Morgan apparently wrote:
>> I'm wondering what is the "recommended" way of handling a lot of  
>> dialog boxes in applications.  There are a couple of way of  
>> handling this that I've thought of but I don't know what would be  
>> considered "best:"
> There is no single best solution. All depends on a number of factors.

More information about the Use-livecode mailing list