Re: Creating/saving/appending to files the Cocoa way
Re: Creating/saving/appending to files the Cocoa way
- Subject: Re: Creating/saving/appending to files the Cocoa way
- From: Shane Stanley <email@hidden>
- Date: Thu, 21 Jan 2010 10:12:50 +1100
- Thread-topic: Creating/saving/appending to files the Cocoa way
On 21/1/10 8:39 AM, "John C. Welch" <email@hidden> wrote:
> but I wish I knew why creating the variables with my NSString's
> blah and my NSData's foo didn't do it.
Your NSData line did nothing -- it's unnecessary.
"NSUTF8StringEncoding" is an enum like an AS enumeration -- it usually
represents a string or number. It seems ASObjC adds all enums and class
names as properties of the application, so to use them you need to use the
form "current application's NSWhatever".
The upshot is that you can end up with statements containing "current
application's " several times. I've been tempted to add "property ca :
current application" and use the abbreviation, just to keep the line length
down and improve readability. Maybe one day Chris N will take pity on us and
give us a shorter equivalent (and for "missing value", too).
In the meantime, I have a few scripts I use in Xcode. The one I use most is
one that simply inserts "current application's ".
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden