On Jul 7, 2011, at 12:45 PM, Kevin Muldoon wrote: > Can I (or should I) hook up File's Owner as I would a subclass of > NSWindowController? Thereby skipping creating a new object->subclassing as > SecondWindow? That seems 'right'. That nicely separates my code from my UI, > making it (bit) more portable, but may be contributing to unresponsive > behavior.
I’m sorry, I don’t understand what you’re asking. The class of the Files’ Owner object should be set to your NSWindowController subclass. You don’t add any custom object to the nib for the window controller. The “File’s Owner” pseudo-object in the nib is a placeholder for the pre-existing object specified as the owner when the nib is loaded; it’s not an object loaded by the nib. The purpose of that object is so that outlets in that object can be hooked up, and so objects from the nib can be pointed at it. > For instance...This code will update NSTextField with text... > > secondWindow = [[SecondWindow alloc] init]; > [secondWindow setStringValueOfMyTextField:@"Hello! I am SecondWindow! I > am very glad to meet you."]; > [secondWindow showWindow:secondWindow]; > > This code will NOT update NSTextField with text... > > secondWindow = [[SecondWindow alloc] init]; > [secondWindow showWindow:secondWindow]; > [secondWindow setStringValueOfMyTextField:@"Hello! I am SecondWindow! I > am very glad to meet you.”; Both of those should work correctly. —Jens_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com