NSDocument open/new file problem when model object instance is in nib.
NSDocument open/new file problem when model object instance is in nib.
- Subject: NSDocument open/new file problem when model object instance is in nib.
- From: joe OneNinetyTwo <email@hidden>
- Date: Tue, 15 Aug 2006 14:22:47 -0700 (PDT)
I have an instance of my model object inside
MyDocument.nib.
This instance is the content for an
NSObjectController, which, in turn, is bound to two
NSArrayControllers, which are bound to two
NSTableViews of two NSArrays inside my model object.
The corresponding model object inside MyDocument.m via
IBOutlet is connected to the model object instance
inside the nib.
When I create a New document, the window controller
opens the nib, unarchives the model instance, and sets
it as the model object inside MyDocument object.
Now, here's my problem. If I open a file, then
loadDataRepresentation unarchives the coded model
object saved in the file, and then the window
controller opens the nib, unarchives the model
instance in the nib, and sets it as the model object
inside MyDocument object. The model object that was
in my file gets released and deallocated, and I'm
looking at a new document window.
If I remove the model object instance from the nib,
then I lose the content for the ObjectController.
Any suggestions on how I can solve this problem?
Thanks,
Philip
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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