On Mar 5, 2015, at 8:15 PM, Shane Stanley <sstan...@myriad-com.com.au> wrote:

> On 6 Mar 2015, at 12:06 pm, Ken Thomases <k...@codeweavers.com> wrote:
>> 
>> I _think_ connections to File's Owner are restored when the cell view NIB is 
>> loaded, but the File's Owner of the sub-NIB may not be the same as the 
>> File's Owner of the outer NIB.  It may not even be the same class.  It may 
>> also work to connect to the Application placeholder; haven't checked.
>> 
>> However, it doesn't seem to work to connect to the Shared User Defaults 
>> Controller, as you've discovered.  
> 
> So you're saying it's a bug?

I think the bug is that IB hides the existence of the sub-NIB.  If IB presented 
the sub-NIB with all of the usual placeholders and put a Shared User Defaults 
Controller into it when you set a binding on it, etc., that would help make 
this clear.

Also, it's a bug that IB will blithely let you create connections from objects 
in the sub-NIB to objects outside the sub-NIB when those connections won't 
survive to runtime.


>> Hopefully that works for you.
> 
> It does, thanks.

You're welcome.


On Mar 5, 2015, at 9:02 PM, Shane Stanley <sstan...@myriad-com.com.au> wrote:

> On 6 Mar 2015, at 12:06 pm, Ken Thomases <k...@codeweavers.com> wrote:
>> 
>> It seems you can't delete the cell view that's under the table column in the 
>> first NIB.
> 
> It also seems that the row height is based on its height.

How so?  To my knowledge, Cocoa doesn't yet support determining row height 
automatically based on the height of cell views (presumably determined by auto 
layout).  UIKit has that, but AppKit does not.  And it's not clear to me if it 
makes sense for a table that can have multiple columns, since each column's 
cell view can be different.

You set the table view's row height on the table view itself, on the Size 
inspector.  There is an Automatic mode, but that uses the row size style from 
System Preferences.

I guess I do see that when you first switch from Automatic to Custom, IB uses 
the tallest of the cell views of the table's columns to pick the new default 
value for the row height, but you can just change it from that value.

Anyway, the table view gets its row and cell views from the delegate. It is 
true that -makeViewWithIdentifier:owner: will consult the registered cell view 
NIB for the identifier and, when the table view is loaded from its NIB, the 
mapping of identifiers to NIBs is pre-populated with the cell view sub-NIBs 
embedded in the table view NIB.  But if you modify that mapping early enough, 
the table view should never know anything about the vestigial cell view in its 
NIB.

Regards,
Ken


_______________________________________________

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

Reply via email to