On Tue, Dec 13, 2011 at 10:04 AM, Eric Slosser <eric.slos...@v-fx.com> wrote: > I found the solution, and it's all my fault. > > The object 'foo' was meant to be a singleton instance of class 'Foo'. I > always access it through [foo instance], which enforces that. After 'foo' is > created, the nib is loaded in which the binding was expressed. In the > process (see stack below**), -[Foo init] is called. My override of -[Foo > init] didn't have singleton smarts, so I happily handed a different > m_contents to the controller.
Don't be tempted to add singleton smarts to -[Foo init]. ARC will not like them. Instead, add a property to File's Owner that just returns the shared Foo instance. --Kyle Sluder _______________________________________________ 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