In building a small app that reproduces the problem I found the cause of the
assertion. It's caused by me being stupid.
The following code reproduces the assertion:

- (void)outlineViewItemWillCollapse:(NSNotification *)notification
{
id itm = [[notification userInfo] objectForKey:@"NSObject"];
[tree expandItem:itm];
}

Is this a bug? Or is the assertion valid.

What my code was supposed to do is select the item being collapsed if a
child was selected. I used my standard select item  function which selects
an item an expands it, causing the assertion.

Thanks,
Roland

On Tue, Dec 16, 2008 at 9:36 AM, Corbin Dunn <corb...@apple.com> wrote:

> Hi Roland,
> Can you reliable reproduce this problem? If so, can you please log a bug,
> including your test application (or a link to download it). Or, ideally, if
> you have source code that can be compiled that makes things even easier to
> debug.
>
> -corbin
>
>
> On Dec 15, 2008, at 11:08 AM, Roland Rabien wrote:
>
>  I'm having an NSOutlineView Assertion Failure on collapse if the selected
>> item is a child (or child of child, etc) of the item that is being
>> collapsed. Has anyone else had this problem? I've searched the list all
>> the
>> related posts seem to indicate threading is the cause, but my application
>> isn't using any threads. I'm using XCode 3.1 and targeting 10.5 (Intel). I
>> never call reloadData on my NSOutLineView, so it's data should be
>> constant.
>> Any ideas?
>>
>> **** Assertion failure in -[NSOutlineView
>> _expandItemEntry:expandChildren:startLevel:](),
>> /SourceCache/AppKit/AppKit-949.35/TableView.subproj/NSOutlineView.m:1003*
>>
>>
>> #0 0x92a42c66 in -[NSException raise]
>>
>> #1 0x9259ef22 in -[NSOutlineView collapseItem:collapseChildren:]
>>
>> #2 0x92306c9a in -[NSOutlineView
>> _doUserExpandOrCollapseOfItem:isExpand:optionKeyWasDown:]
>>
>> #3 0x9230679e in -[NSOutlineView mouseTracker:didStopTrackingWithEvent:]
>>
>> #4 0x923065ce in -[NSMouseTracker stopTrackingWithEvent:]
>>
>> #5 0x92278d03 in -[NSMouseTracker trackWithEvent:inView:withDelegate:]
>>
>> #6 0x921bdb54 in -[NSOutlineView mouseDown:]
>>
>> #7 0x9216476b in -[NSWindow sendEvent:]
>>
>> #8 0x92131311 in -[NSApplication sendEvent:]
>>
>> #9 0x9208ed0f in -[NSApplication run]
>>
>> #10 0x9205bf14 in NSApplicationMain
>>
>> #11 0x00001c70 in main at main.m:13
>> _______________________________________________
>>
>
>
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to