A good model header?
A good model header?
- Subject: A good model header?
- From: "Theodore H. Smith" <email@hidden>
- Date: Thu, 29 Jul 2004 22:24:05 +0100
Sorry to ask such basic questions. I've started refactoring my code,
and this is the code for the "Model" of the MVC design. (This code is
just an illustrative example, the real thing is more complex than
necessary to show my new design):
@interface Frac : NSObject <NSCoding> {
double vTurn;
double vSquash;
NSDocument* Doc;
}
-(void)Draw : (CGContextRef)Ref;
-(double)Turn;
-(void)setTurn :(double) t;
-(double)Squash;
-(void)setSquash :(double) sq;
I'm wondering if this is a form that works well with the Cocoa
framework? Heres the design changes I made:
1) I've made it use NSCoding
2) It has accessor methods in case I ever want to script my app, or if
I want to make it undoable.
3) It has a reference to it's document (with which to access
NSUndoManager I think?)
_______________________________________________
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.