Under 10.6.2 my program is throwing an exception when I call the 
NSPredicateEditor method reloadCriteria.  I do not see the behavior  on earlier 
releases of 10.6 or 10.5.  

When the exception is thrown the stack is the following:

#0  0x96f624e6 in objc_exception_throw ()
#1  0x95657138 in +[NSException raise:format:arguments:] ()
#2  0x956570aa in +[NSException raise:format:] ()
#3  0x9926b496 in -[NSPredicateEditor _predicateFromRowItem:] ()
#4  0x9926a320 in -[NSPredicateEditor _updatePredicateFromRows] ()
#5  0x9920ac4e in -[NSRuleEditor 
observeValueForKeyPath:ofObject:change:context:] ()
#6  0x9820aca7 in NSKeyValueDidChange ()
#7  0x981ef6d0 in -[NSObject(NSKeyValueObserverNotification) 
didChangeValueForKey:] ()
#8  0x981e587a in -[NSCFDictionary setObject:forKey:] ()
#9  0x98206dac in _NSSetUsingKeyValueSetter ()
#10 0x982e5674 in -[NSKeyValueSlowMutableArray removeObjectAtIndex:] ()
#11 0x95645c73 in -[NSMutableArray removeAllObjects] ()
#12 0x982e4825 in -[NSKeyValueMutableArray setArray:] ()
#13 0x992051a6 in -[NSRuleEditor reloadCriteria] ()
#14 0x99269f0b in -[NSPredicateEditor reloadCriteria] ()
#15 0x00026971 in -[Game_Document Display_Filter_Window:] (self=0x1053ec0, 
_cmd=0x336af, sender=0x10b75b0) at 
/Volumes/HD/Football_Review/Source/Game_Document.m:1705
#16 0x98b98f86 in -[NSApplication sendAction:to:from:] ()
#17 0x98c78705 in -[NSControl sendAction:to:] ()
#18 0x98c741ba in -[NSCell _sendActionFrom:] ()
#19 0x98c734b1 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] ()
#20 0x98cc895d in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] ()
#21 0x98c71f07 in -[NSControl mouseDown:] ()
#22 0x98c6ff10 in -[NSWindow sendEvent:] ()
#23 0x98b88b2f in -[NSApplication sendEvent:] ()
#24 0x98b1c4ff in -[NSApplication run] ()
#25 0x98b14535 in NSApplicationMain ()
#26 0x00002960 in main (argc=1, argv=0xbffff7ec) at 
/Volumes/HD/Football_Review/Source/main.m:13


The following information is output to the console log:

2009-12-15 09:32:49.865 Football_Review[987:a0f] In <NSPredicateEditor: 
0x10ab0b0>, different number of items (1) than values (2)


Below is my function that calls reloadCriteria:

- (IBAction) Display_Filter_Window:(id)sender
{
        if ( ! [main_window makeFirstResponder:main_window]) //force edit 
compleation
                return;
        
        [plays_predicate_editor reloadCriteria];
        
        [ NSApp beginSheet:filter_window modalForWindow: main_window 
modalDelegate:self
                didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) 
contextInfo:NULL]; 
}

I have greatly simplified my predicate and I still get the exception.  If I 
comment out the call to reloadCriteria the predicate editor is correctly 
displayed with the default values setup in IB. 

What is the log message trying to tell me?.  What  strategies and tools can I 
use to debug such a problem?

Thank you for the help.

Marshall


_______________________________________________

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