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: "John C. Welch" <email@hidden>
- Date: Wed, 20 Jan 2010 19:46:04 -0500
- Thread-topic: Creating/saving/appending to files the Cocoa way
On 1/20/10 6:12 PM, "Shane Stanley" <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.
That's another documentation hole in ASOC: when do you need to separately
initialize stuff to use it and when do you not need to do it. After getting
burned a few times, I start doing it because otherwise, the bright
flickering light makes my fingers all owwwie and blistered.
>
> "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".
Ah, that makes sense then, and another thing for the "No, the standard ObjC
docs are *not* all you need" file.
>
> 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).
I'd like to see that split up into two things: one for Interface Builder
hookups, and "nil" so that the ObjC docs are more usable.
>
> 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 ".
I'm beginning to see the wisdom in that.
--
"Life is like an exploded clown. It's really funny until you figure out
what just happened."
_______________________________________________
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