• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Rearranging NSOutlineView via drag-and-drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rearranging NSOutlineView via drag-and-drop


  • Subject: Re: Rearranging NSOutlineView via drag-and-drop
  • From: Akis Kesoglou <email@hidden>
  • Date: Mon, 05 Jan 2015 15:24:32 +0200

> 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 (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


  • Prev by Date: what methods are called when the user taps with two fingers in UITextView?
  • Next by Date: Re: About the Bundle creator OS Type code
  • Previous by thread: what methods are called when the user taps with two fingers in UITextView?
  • Next by thread: dealloc query for NSTableCellView
  • Index(es):
    • Date
    • Thread