Question about Saving a document
Question about Saving a document
- Subject: Question about Saving a document
- From: Francis Derive <email@hidden>
- Date: Mon, 5 Jun 2006 12:42:31 +0200
Bonjour à toute la liste,
My document nib has :
- an instance of a simple model object,
- an instance of its controller,
- the document window owns
- an (input) NSTextField, bound to the unique model object instance
variable, via the controller
- an (output) NSTextField, bound to a controller key which is
dependent from the same above variable.
So, the interface works fine : the output is displayed in response to
the content of the NSTextField.
Now I want to know how to save this sample document, and so I have to
overwrite :
- (NSData *) dataOfType:(NSString *)typeName error:(NSError **)outError
But how do I reach the object to archive, doing [NSArchiver
archivedDataWithRootObject:<#(id)rootObject#>] ?
Cocoa Bindings is nice to make the design light - but it seems I
have nothing left to work with !
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName
error:(NSError **)outError
Here too : How can I tell the model object instance variable to get
the result of [[NSUnarchiver unarchiveObjectWithData:<#(NSData *)
data#>] retain] ?
Merci beaucoup de votre aide.
Francis _______________________________________________
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