Trapping for Cancel Answer printer

katir at hindu.org katir at hindu.org
Wed Dec 3 13:59:32 EST 2003


Okay, let me try to rephraze that rule: system and rev (official) dialogs return content in it but the button clicks or error in the result.

Well, choosing "Cancel" in a system dialog box would return dialogData...feedback on user selection is consider "error data" but "Cancel" is passed to "the result," not "it"  for "answer printer"

So, if there is a "general rule" its not that which you propose.
It would be good to now what it is...


On Dec 1, 2003, at 3:11 PM, Richard Gaskin wrote:

Alex Rice wrote:

On Nov 30, 2003, at 12:46 PM, katir at hindu.org wrote:
This is either a bug, where for use of  "answer printer" Rev should
pass the result to "it" or needs more documentation if the globally
expected engine behavior is for anything from the system to *not* be
in "it" but be passed via the result, which is also logical. Old time
xTalkers may take that for granted, newbies will stumble

As Ken confirmed, the solution is to check the result, not "it". I
think the docs reflect that.
As a relative new xtalker I have sometimes been confused when sometimes
"it" is called for, and sometimes "the result". Is there any general
rule to be aware of?

As a very general rule, "the result" is used for error info while "it"
contains data.

Are there other exceptions to this?

Set the dontUseQT property to true, and it should revert to using Windows
MediaPlayer which should play MP3's and MPEG files in a player object. Also
depends whether you want to play short embedded clips or full movies/sound
recordings from files.


Good try, but, if you  if you do this:

answer "Do you want to go home?" with "Cancel" or  "Yes"

 and the user selects "Cancel" it will be in the variable "it"

Taking Richard's rule, we might just elaborate:

"As very general rule, "the result" is used for error information as well as responses from the local system,  while "it" contains data returned from Revolution scripts"

Does that work? Well, not quite, because some system functions put data into "it."



Robert Wrote:

Okay, let me try to rephraze that rule: system and rev (official) dialogs return content in it but the button clicks or error in the result.

Katir wrote:
Well, choosing "Cancel" in a system dialog box would return dialogData...feedback on user selection is not "error data" but "Cancel" is passed to "the result," not "it"  for "answer printer"

So, if there is a "general rule" its not that which you propose.
It would be good to now what it is...


On Dec 1, 2003, at 3:11 PM, Richard Gaskin wrote:

Alex Rice wrote:

On Nov 30, 2003, at 12:46 PM, katir at hindu.org wrote:
This is either a bug, where for use of  "answer printer" Rev should
pass the result to "it" or needs more documentation if the globally
expected engine behavior is for anything from the system to *not* be
in "it" but be passed via the result, which is also logical. Old time
xTalkers may take that for granted, newbies will stumble

As Ken confirmed, the solution is to check the result, not "it". I
think the docs reflect that.
As a relative new xtalker I have sometimes been confused when sometimes
"it" is called for, and sometimes "the result". Is there any general
rule to be aware of?

As a very general rule, "the result" is used for error info while "it"
contains data.

Are there other exceptions to this?


More information about the use-livecode mailing list