> But in my app, whether an item has children or not can affect which icon 
> appears beside it in the list. Unfortunately, reloadItem: doesn't request a 
> view, which would call the function that assigns icons, nor can I figure out 
> how to ask the outline for the view after my delegate creates it. Rather than 
> trying to come up with some system to track the views outside of the outine, 
> I gave up and simply use performSelector:withObject:afterDelay using a 
> 0.5-second delay to call a method which reloads the entire outline after a 
> move operation is successful. Now rearranging the tree works as expected and 
> both the disclosure triangles and the item icons get updated properly.  

Bindings can help you there — you could bind the image view and text label to 
the row’s objectValue and you could assign another icon on item move and the 
view would update itself. This won’t help you with the disclosure triangle, but 
maybe it’s worth exploring.
_______________________________________________

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