Re: Hi, moving to Objective-C from RB.
Re: Hi, moving to Objective-C from RB.
- Subject: Re: Hi, moving to Objective-C from RB.
- From: Matt Neuburg <email@hidden>
- Date: Sat, 29 Jan 2005 09:40:38 -0800
On Sat, 29 Jan 2005 16:29:54 +0000, Tom Hancocks <email@hidden>
said:
>I've been learning Cocoa for around a week now, and so far i have been
>able to the basics relatively easily. I have made a program that has 2
>NSTableViews. One acts as a "library" list containing the other lists
>which are either memo or todo lists. I've got the whole program working
>really nicely thanks to bindings, but i can't figure out how to save
>these lists at all. I've looked at tutorials and references on the net,
>but i can not understand what they are saying. Could any one tell me
>how this is done?
Ignore the NSTableViews (in Cocoa these are merely views) and look at the
data (the model). Presumably these data are in some convenient collection
format, such as an array of dictionaries of strings. So now consider
NSArray's writeToFile:, which will save the data in a single move. More
elaborate saving behaviors (for data structures where not everything is a
property list object) will typically use an NSArchiver; I strongly advise
that you read Aaron Hillegass's book (second edition only!), which
illustrates this very well. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden