Re: NSDocument's loadDataRepresentation called before the document UI is functional?
Re: NSDocument's loadDataRepresentation called before the document UI is functional?
- Subject: Re: NSDocument's loadDataRepresentation called before the document UI is functional?
- From: Brent Gulanowski <email@hidden>
- Date: Mon, 11 Aug 2003 11:23:15 -0400
On Monday, August 11, 2003, at 09:50 AM, Wade Tregaskis wrote:
Simply put, any UI-related code in loadDataRepresentation doesn't have
any effect - text views which have their text storage updated don't
reflect the change, tables won't change selected rows, etc etc.
How can I fix/get around this?
You would have to load the NIB earlier than normal.
-makeWindowControllers and -windowNibName are called after
-loadDataRepresentation. Try loading the NIB file (that is,
instantiating a window controller with the NIB) before unarchiving the
data. I don't know if there's any issue with trying to add the window
controller that early, but you can always store it in a separate ivar
in your subclass and add it to the document's array of window
controllers later, in -makeWindowControllers.
--
Brent Gulanowski email@hidden
_______________________________________________
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.