> On 25 Jan 2015, at 10:34, Roland King <r...@rols.org> wrote: > > I have a xib with a top-level view and a bunch of subviews which represents > one view of a given model object. The top-level NSView subclass has a > readwrite property which is the model object of which it's a view. I thought > this was a pretty standard pattern, especially in OSX which only just > recently started to really make use of view controllers. > I would embrace NSViewController and use -representedObject. Bindings + MVC have an established track record and it does correct memory management that can be tricky to get right otherwise. Your pattern is not very MVC at the moment!
> I can bind to files owner, the shared defaults controller and the > application only, or to any other standalone Object I put in the NIB, but > none of those help. You can if your file’s owner has an outlet for the top level view (NSViewController does of course): myFilesOwner.myTopLevelView.myObject.myProperty Jonathan _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com