Re: View based outline view and custom NSTableCellViews
Re: View based outline view and custom NSTableCellViews
- Subject: Re: View based outline view and custom NSTableCellViews
- From: Jean Suisse <email@hidden>
- Date: Thu, 06 Sep 2012 21:01:38 +0200
To add a few more informations:
If I manually write the outlet declaration in MyTableCellView.h (@property(weak) NSTextField* myTextField); and if I add the @synthesize method in the .m file, this time, IB is letting me do the connection.
However, IB is presenting me with a window I am not familiar with [1], requesting additional informations, related to bindings. So far, I haven't been able to make it work.
Jean
[1] such as Bind (set to DisplayPattern Value1), controller (set to My table cell view, the name of the view in IB), the name of the custom class (set to MyTableCellView), the keypath (set by default to objectvalue, the key should be here), the model object, set to MyTableCellView, an other keypath, set to MyTextField.
On 6 sept. 2012, at 20:34, Jean Suisse wrote:
> Thank you for your reply.
>
>> Elaborate on "not letting me do that."
>
> That is Ctrl + drag from the textfield I added in the TableCellView (declared to ID as MyTableCellView) towards the header file MyTableCellView.h (to declare the property + declare the outlet in one shot).
> Also, if I create them manually, IB is refusing to do the connection.
>
>
> Jean
>
>
> On 6 sept. 2012, at 19:11, Seth Willits wrote:
>
>>
>> On Sep 6, 2012, at 7:46 AM, Jean Suisse wrote:
>>
>>> Instinctively, I would create a subclass of NSTableCellView (MyTableCellView), set the NSTableCellView to be MyTableCellView in IB and connect all the outlets to be able to do this at runtime : [MyTableCellView.MyExtraTextField setXXXValue: …];
>>
>> That's exactly what you do.
>>
>>
>>> But IB is not letting me do that. What did I miss ? They do that in the example provided by apple.
>>
>>
>> I suspect you're grabbing the wrong thing in IB, or IB doesn't know about your cell view subclass etc. The usual things. It's like any other custom class stuff in IB, so there aren't any hidden tricks involved.
>>
>> Elaborate on "not letting me do that."
>>
>>
>> --
>> Seth Willits
>>
>>
>>
>>
>>
>> _______________________________________________
>>
>> 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
>
_______________________________________________
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