views:

209

answers:

1

Hi guys

I am trying to reload a particular item in my outline view using reloadItem or reloaditem:reloadchildren function in NSoutlineView but its crashing my entire application. please can you tell me a workaround for this like I also tried to collapse that item and expand it again but it is not reloading that item and its children.

Right now what I am doing is:

  1. I am manually saving the state of my outline view using a for loop and saving the item if its in expanded state or not.

  2. Calling NSOutlineView's reloadData function

  3. Then using the saved state, run a for loop to expand all the items that were previously expanded.

But this method has a lot of performance overhead. Is there any other solution to this method?

Is there any method to auto save the state of outline view and reload it and set that state again? what do these autosaveExpandedItems and setautosaveExpandedItems methods do?

Thanks

A: 

This is a common behavior in 10.6 if you try to reload a node while a reload process is in progress.

This method (or some deeper related methods) was improved for 10.6. Actually there is an NSAssert but it feels like a crash when you are loading the node in awakeFromNib on startup due to the leak of a proper exception handler that handles 'inconsistence exception'.

cocoafan