NSDocument subclass and separate panels
NSDocument subclass and separate panels
- Subject: NSDocument subclass and separate panels
- From: Coleman Nitroy <email@hidden>
- Date: Sun, 26 Dec 2004 20:47:29 -0500
I am having trouble figuring out how to get panels to work well with a
Document SubClass project.
Here is an example of what I am trying to do.
Have a subclass of NSDocument (its a document based application) this
class contains something like this...
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType
{
linesCount = [data countTheLinesOrSomething];
return YES;
}
But in a separate nib file and subclass of NSWindowController, I want
to have this stuff that controlls this particular panel(s). So in this
example this nib has a textfield that displays linesCount. How would I
make this so that it worked like photoshop, where I select documentOne,
and it displays "10 lines", and documentTwo displays "3 lines" and I
create a new document and it displays "0 lines" and the panel changes
depending on which window is in the foreground. Does NSDocument handle
this and makes it automatic?
Will this work automatically if I import the NSDocument subclass's
header into the NSWindowController and just use the instance of
linesCount, from a set or get function?
Thanks, and hope everyone had a good holiday.
---
Coleman Nitroy
email@hidden
nitroy.com/cole
_______________________________________________
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