Re: Why IBOutlet don't work under NSTableCellView?
Re: Why IBOutlet don't work under NSTableCellView?
- Subject: Re: Why IBOutlet don't work under NSTableCellView?
- From: Kyle Sluder <email@hidden>
- Date: Fri, 08 Nov 2013 08:30:15 -0800
On Nov 8, 2013, at 8:06 AM, Charles Srstka <email@hidden> wrote:
>
> Views inside view-based table views can't have references, whether through outlets or bindings, with anything but the table view's delegate. If you give your object an outlet to the table's delegate, and then give the table's delegate an outlet to your "ref" object, then that will work.
If you think about it, this makes some sense, until you think abut it some more. :)
By default, the File's Owner when loading a table view cell or row view is the table view's delegate. So connections to that object will be able to be restored by the nib loading machinery. It's just really confusing that IB shows you all the objects from the top-level nib while editing the embedded nib—it would be much better if the Object Hierarchy were replaced with the contents of the embedded nib. (That would also make it possible to add top-level objects like object controllers to the embedded nib.)
Furthermore, the delegate being File's Owner is a *default*, not a *guarantee.* If the sidebar changed to accurately represent the embedded nib, one could connect to the embedded nib's File's Owner proxy and it would work with whatever object is passed to -makeViewWithIdentifier:owner:.
I've filed this in the past as rdar://problem/9583635. Feel free to dupe :)
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden