• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Use AS operators dinamically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use AS operators dinamically


  • Subject: Re: Use AS operators dinamically
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 05 Jan 2010 19:27:55 -0800
  • Thread-topic: Use AS operators dinamically

On or about 1/5/10 7:13 PM, thus spake "Mark J. Reed" <email@hidden>:

> On Tue, Jan 5, 2010 at 9:53 PM, Matt Neuburg <email@hidden> wrote:
>>
>>  def apply(target, op, comp)
>>    target[its.send(op, comp)].get
>>  end
>
> Where does "its" come from?  Is it defined by appscript?

Correct-a-mundo. The script as I showed it presupposes that the appscript
library is loaded and the Appscript module is included (in the Ruby sense);
that brings a few convenient terms like "app" and "its" (both used in the
example) into the global namespace. Alternatively I could have written
"Appscript.its" and "Appscript.app", to reduce global namespace pollution.

Here's my online book on the topic of Appscript:

  http://www.apeth.com/rbappscript/00intro.html

m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com



 _______________________________________________
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

References: 
 >Re: Use AS operators dinamically (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Use AS operators dinamically
  • Next by Date: Re: Newbie apple mail quesion - Putting the Subject of the active email on the Clipboard
  • Previous by thread: Re: Use AS operators dinamically
  • Next by thread: Re: Use AS operators dinamically
  • Index(es):
    • Date
    • Thread