• 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
NSOutlineView assertion failure on redraw .. ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView assertion failure on redraw .. ?


  • Subject: NSOutlineView assertion failure on redraw .. ?
  • From: "Michael Hanna" <email@hidden>
  • Date: Wed, 2 Jul 2008 14:35:42 -0700

I have an NSTreeController bound to a data model:

        [m_rulesDMTreeController bind:@"contentArray"
                             toObject:rulesDM
                          withKeyPath:@"rules"
                              options:nil];

and an NSTableColumn(inside an nsoutlineview) bound to the tree
controller.arrangedObjects.Name keypath. Infrequently, but not always,
I will get an assertion error:

2008-07-02 14:13:19.387 Submit[390:10b] *** Assertion failure in
-[NSOutlineView _expandItemEntry:expandChildren:startLevel:](),
/SourceCache/AppKit/AppKit-949.33/TableView.subproj/NSOutlineView.m:1003
2008-07-02 14:13:19.388 Submit[390:10b] Invalid parameter not
satisfying: itemEntry->children == NULL

This occurred when I ran this code:

[cut]
            //  make the cocoa bindings system be aware of the change
with -mutableArrayValueForKey

            NSMutableArray* sourceChildren = [sourceParent
mutableArrayValueForKey:@"children"];
            NSMutableArray* destinationChildren = [destinationParent
mutableArrayValueForKey:@"children"];

            //  re-parent the group we're moving and do the move operation

            [movedGroup setParentGuid:destinationParentGuid];

            [self willChangeValueForKey:@"rules"];

            [destinationChildren addObject:movedGroup];
            [sourceChildren removeObject:movedGroup];

            //  if the source parent has zero children, delete it from
m_elements

            if( [sourceChildren count] == 0 )
            {
                [self deleteRule:sourceParent allRuleGroups:[self ruleGroups]];
            }

            [self didChangeValueForKey:@"rules"];
[cut]

I have an observer watching the "rules" data model and the assertion
error occurs before the data model gets changed.

This doesn't happen that frequently, but enough to be a concern. Any
suggestions why the outlineview is re-populating before the data model
changes(apparently)?

Failing any reasonable workaround, is there a way I can detect when
this assertion occurs so I can attempt a 'fallback' mechanism?

Michael
_______________________________________________

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

  • Follow-Ups:
    • Re: NSOutlineView assertion failure on redraw .. ?
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: [Q] Regression of setSize for NSImage?
  • Next by Date: Re: Implementing NSOutlineView autosaveExpandedItems with CoreData
  • Previous by thread: Layer hosting view not redisplaying under PPC
  • Next by thread: Re: NSOutlineView assertion failure on redraw .. ?
  • Index(es):
    • Date
    • Thread