Re: Selection of object in popup button
Re: Selection of object in popup button
- Subject: Re: Selection of object in popup button
- From: Mikael Wämundson <email@hidden>
- Date: Mon, 27 Sep 2010 22:11:41 +0200
Hi Alejandro,
Thanks for your reply. Can you explain further what you mean with "binding the appearance attributes of your cell"?
/Mikael
26 sep 2010 kl. 22.35 skrev Alejandro Rodríguez:
> Hey Mikael,
>
> In order to solve your issues you need to get away from selection. Providing the data available in your popups is a Model matter not a View/Controller issue so it should not depend on the current table selection. The easiest way to do this is using bindings. If you have an Array Controller providing content for your table then you can set the keypath in your column to your model method that returns the desired array for a given object. As for updating the cells you need to tell the table that it needs to redraw itself. However if you bind the appearance attributes of your cell the model object you can also achieve the same result without any code. the arrayController.arrangedObjects keypath is your friend here.
>
> Good luck,
>
> Alejandro
>
>
>>
>> Dear developers,
>>
>> In a table view I have in one column a popup button cell. The content array of the popup button depends on what object is selected in the table view and also a predicate object. I have noticed some problems when coding this, though:
>>
>> 1. If no row (object) is selected in the table view, clicking on the popup button for one row reveals the array of the popup button, but the content array depends on the selected object in the table view. But it seems like no object is selected. The second time i click the popup button the row is recognized as selected. How do I overcome this?
>>
>> 2. Depending on what object I select in the popup button some attributes of the selected object in the table view is affected. It seems, though, like selecting an object in the popup button is not enough. I need to deselect the row in the table view or select another row to actually perform the selection. How do I overcome this?
>>
>> Thanks!
>> /Mikael
>
>
> _______________________________________________
>
> 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