Re: NSStatusItem setHighlightMode throws NSInternalInconsistencyException on PowerPC ONLY (Works on Intel)
Re: NSStatusItem setHighlightMode throws NSInternalInconsistencyException on PowerPC ONLY (Works on Intel)
- Subject: Re: NSStatusItem setHighlightMode throws NSInternalInconsistencyException on PowerPC ONLY (Works on Intel)
- From: John Stiles <email@hidden>
- Date: Tue, 12 Feb 2008 09:58:44 -0800
What if you try moving the call to -setHighlightMode: later in the
function, after the view it set up?
Vance wrote:
Hi everyone,
My application works fine on Intel, but on PowerPC it crashes with
NSInternalInconsistencyException exception while calling
setHighlightMode:YES. I can't figure out what the problem is.
statusBar = [[NSStatusBar systemStatusBar] retain];
if (statusItem = [[statusBar statusItemWithLength:50] retain])
{
[statusItem setLength: NSVariableStatusItemLength];
[statusItem setHighlightMode:YES];
statusView = [[StatusBarCustomView alloc] initWithFrame:
NSMakeRect(0,0, 30, [statusBar thickness])];
[statusView setStatusItem: statusItem ];
[statusView setImage: img ];
[statusItem setView: statusView];
pullDownView = [[MainView alloc] initWithFrame:
NSMakeRect(0, 0, 191, 50)];
[statusView setPullDownView: pullDownView];
[pullDownView release];
[statusItem setLength:NSVariableStatusItemLength];
}
Application Specific Information:
*** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Uninitialized rectangle
passed to [View initWithFrame:].'
Thread 0 Crashed:
0 com.apple.CoreFoundation 0x947a3ee8
___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 0
1 libobjc.A.dylib 0x91b666a8 objc_exception_throw
+ 68
2 com.apple.CoreFoundation 0x947a3e4c +[NSException
raise:format:arguments:] + 136
3 com.apple.Foundation 0x934f0e70 -[NSAssertionHandler
handleFailureInMethod:object:file:lineNumber:description:] + 116
4 com.apple.AppKit 0x92759f64 -[NSView
initWithFrame:] + 336
5 com.apple.AppKit 0x9275c40c -[NSControl
initWithFrame:] + 192
6 com.apple.AppKit 0x9275c2d4 -[NSButton
initWithFrame:] + 72
7 com.apple.AppKit 0x92c6bcc0 -[NSStatusBarButton
initWithFrame:inStatusBar:] + 72
8 com.apple.AppKit 0x92c6ba58
-[NSStatusBar(NSStatusBar_Appearance)
_createStatusItemControlInWindow:] + 144
9 com.apple.AppKit 0x92c76148 -[NSSystemStatusBar
_createStatusItemControlInWindow:] + 56
10 com.apple.AppKit 0x92c6d75c -[NSStatusItem
_button] + 68
11 com.apple.AppKit 0x92c6d590 -[NSStatusItem
setHighlightMode:] + 32
12 com.yourcompany.Outside 0x000034b4 -[Controller
awakeFromNib] + 268
13 com.apple.CoreFoundation 0x947b1b50 -[NSSet
makeObjectsPerformSelector:] + 200
14 com.apple.AppKit 0x92755054 -[NSIBObjectData
nibInstantiateWithOwner:topLevelObjects:] + 1264
15 com.apple.AppKit 0x9274c658 loadNib + 224
16 com.apple.AppKit 0x9274bffc
+[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]
+ 840
17 com.apple.AppKit 0x9274bbd8
+[NSBundle(NSNibLoading) loadNibNamed:owner:] + 336
18 com.apple.AppKit 0x9274b8c0 NSApplicationMain + 332
19 com.yourcompany.Outside 0x00002ae8 _start + 756
20 com.yourcompany.Outside 0x000027ec start + 44
_______________________________________________
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
_______________________________________________
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