On Sunday, February 29, 2004, at 11:23 PM, [EMAIL PROTECTED] wrote:


Subject: Re: The "Answer with dialog"
To: How to use Revolution <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; format=flowed

Ok got that , now to trap the yes or whatever , I tried
if it is "a" , didn't work out.
also tried put it into it and then if it is "a" also not
thanks hershrev.


Hershrev,


Do you know how to use the debugger? If not it's really worth figuring out how to use it, because you could have answered your own question without having to wait for a reply email.

If you have this code in a button's script:

on mouseUp
   answer "Do you want to save?" with "No" or "Yes"
end mouseUp

Set a breakpoint on the "answer" line, close the script, then click the button. When the debugger comes up, click "step over" -- the answer dialog will come up and you'll select either "Yes" or "No". You'll now be back in the debugger on the "end mouseUp" line. Now open the "Variable Watcher" window. You'll see that the variable "it" has the name of the button you clicked.

Click Abort or Run to get out of the debugger, then edit your script like this:

on mouseUp
   answer "Do you want to save?" with "No" or "Yes"
   if it is "Yes" then
     ... do save...
   end if
end mouseUp

Hope this helps.

-- Frank

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to