Modal dialog not modal... any hints?

Tereza Snyder tereza at califex.com
Tue Jan 19 14:05:06 EST 2010


I have this handler in a script:


function YesOrNo pQuestion, pDefaultAnswer
   set the Question of stack "AskYesOrNo"  to pQuestion
   set the DefaultAnswer of stack "AskYesOrNo" to pDefaultAnswer
   modal "AskYesOrNo"	
   return the dialogData
end YesOrNo

The stack "AskYesOrNo" is intended to do what you'd expect: it displays the question with "yes" or "no" and returns "yes" or "no" in the dialog data. However, when I call this handler, it returns empty before it even displays the dialog. If I insert a "put" statement AFTER the "modal" statement, the putted text is visible in the message box while the dialog is on the screen, and statements in the caller of the YesOrNo function are executed before I exit the dialog.

In other words, "modal" seems broken. Before I start making test stacks, has anyone encountered this before? Could there be a bug in the dialog scripts that causes the dialog to fail silently?

(Revolution 3.5, MacOS 10.6.2)

t


-- 
Tereza Snyder
Califex Software, Inc.
<www.califexsoftware.com>







More information about the use-livecode mailing list