Thank you for your post.
If the Print Setup has a Restore, canceling will have no effect because the restore has already occurred. In this case, FileMaker cannot set Get(LastError) to 1.
Thank you for the link from the Discussion board. I will also reply there.
2 of 2 people found this helpful
We really need to be able to detect that "cancel" click for any system dialog that one of our scripts has opened. Being unable to do so in this "special case" is a potential problem.
Yes, philmodjunk, that's what I'm thinking. Error No. 1 is specifically "User canceled action" (which isn't technically an error). So Error = 1 would seem to be the normal out come of all dialog windows where user selects "Cancel". I can understand that the event already occurred and can't be undone by FileMaker, but it is the developer's responsibility to handle outcomes. And indeed knowing that the user pressed "Cancel" rather than "Ok" would provide them a direct way to follow up (rather than both returning 0). As an rough comparison: in the "Save Records As...." dialog windows the user can do things like create folders, rename, delete files,... and then press "Cancel", but it is understood that pressing "Cancel" won't undo those changes.
TSGal, thanks for considering!