On 29/04/2011, at 00:17, Alexander Spohr wrote: >> I have a document-based app which loads a couple of NSWindowController >> subclasses. That's fine. In one of the subclasses, I load a nib with a >> NSView subclass. It wants to access one of the instance vars in the window >> controller subclass. I thought "no worries, I should be able to hook up a >> connection in IB and it will be right". > >> [...] >> >> Am I doing this the wrong way or do I have some sort of misunderstanding >> about how this works? > > Either or both. > > The view itself should not know anything about its controller or the > controllers ivars. Wrong direction. > You should make your WindowController set SundialView's sundial when it has > been loaded. Problem solved.
Yes, you're right. I wanted to try to make IB do everything but it can't. I
(independently) did exactly as you suggested and it works fine. Thanks.
Ben.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
