Re: ASObjC: current application
Re: ASObjC: current application
- Subject: Re: ASObjC: current application
- From: Shane Stanley <email@hidden>
- Date: Wed, 10 Apr 2013 20:55:53 +0800
On 10/04/2013, at 6:43 PM, Marion Dickten < email@hidden> wrote:
is there a point in calling "current application" all the time in an ASObjC app? Why not do this…
set thisApp to current application
…at the beginning of the code and prevent having hundreds of cumbersome statements like
(current application's NSLeftMouseDownMask) as integer) + ((current application's NSKeyDownMask) as integer)
The short answer is that it won't work.(A long time ago I was taught to assign (constant) expressions used frequently to a variable in order to avoid repeated evaluation.
Right, but this isn't really a constant _expression_. The term "current application's whatEver" has to be resolved as a unit.
I wish it weren't so... |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden