Re: Simplifying this code?
Re: Simplifying this code?
- Subject: Re: Simplifying this code?
- From: Shawn Erickson <email@hidden>
- Date: Thu, 29 Jul 2004 11:53:41 -0700
On Jul 29, 2004, at 9:55 AM, Theodore H. Smith wrote:
Thanks Shawn,
I've been studying this document you mentioned. It leads to a lot of
new information... NSDocuments, undo, scripting, archivers,
serialisers, window controllers...
Looks like I have a choice of:
1) Getting to grips with all that, which mostly means studying the API
and finding a good tutorial. (I haven't found an NSDocument or
NSUndoManager tutorial). I'm thinking when my model implements an
NSCoder protocol, I'm still going to have to manually code references
to each object variable! I'll have to refactor my design also because
its all written around saving the interface the C way, generally my
most despised task.
2) Just manually code references to a few object variables, and do it
the C style way.
So really, if I wanted to get the job done, I'd use the C-style way.
If I wanted to learn about Cocoa, I'd do it the Cocoa way. I think I'm
going to do it the Cocoa way. I wonder why I can't find any tutorials
on NSDocument, NSUndoManager and the rest? It seems there is a steep
learning curve with the API at first.
I say spend the time to learn the capabilities provided by Cocoa and it
is paradigms. Doing so will greatly reward you because you can off load
a heck of a lot of code to the framework. I suggest getting the latest
printing of Cocoa Programming for Mac OS X by Aaron Hillegass for it
covers a lot of this stuff in a hands on way. Also Cocoa Recipes for
Mac OS X by Bill Cheeseman is hands on (it is based on the original
Vermont Recipes online tutorial[1]).
Also note the example code under /Developer/Examples/AppKit/ in
particular SimpleComboBox, TextEdit and Sketch if you want to
understand a document based applications.
-Shawn
[1] <
http://www.stepwise.com/Articles/VermontRecipes/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.