Add Comment
|
Related Links
|
TrackBack
Avoid Using "result" as Variable NameI love to use the variable "result" in my programs. For example, "set result to false". But I recently learned the hard way that is a bad choice for variable name in AppleScript. To debug my codes, I would place "display dialog anotherVar" in my program. But then when it came time to use the if-operator on the "result" variable, I'd get an strange error, such as: Can't make {<<class bhit>>:"OK"} into type boolean. It turns out that "display dialog" automatically puts the button string "OK" into the "result" variable. Chieh Cheng I started using "answer" as the variable name in place of "result". Chieh Cheng
Add Comment
|
Related Links
|
TrackBack
Did your message disappear? Read the Forums FAQ. Add CommentSpam Control | * indicates required field TrackBackTrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites. Send Ping | TrackBack URL | Spam Control No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here. Messages, files, and images copyright by respective owners. |
Products
|
Services
45 Users Online
|
Copyright © 1996 - 2024. All Rights Reserved. |