Re: [NSInternalConsistencyException] Setting a drawer's new content view under Tiger
Re: [NSInternalConsistencyException] Setting a drawer's new content view under Tiger
- Subject: Re: [NSInternalConsistencyException] Setting a drawer's new content view under Tiger
- From: Frédéric BLANC <email@hidden>
- Date: Sat, 21 May 2005 20:27:04 +0200
Summary: Setting a different view for an NSDrawer which contains an
NSTextView seems to lead to an error in Tiger.
===
Hi,
I still haven't found what was wrong with my (stupid simple) use of an
NSDrawer… It worked perfectly on Panther, and it's kind of broken in
Tiger.
I've recently posted a tiny project (< 30 KB) in Cocoa-Java on my
website (URL: http://blanc.free.fr/pub/temp/NSInternalConsistencyException.zip),
but failed to get an useful answer :( ! So, today, I've built an
ObjC-based project for you; I hope to get more attention now ;) !
(Fingers crossed…) Thx in advance. Here's the URL:
http://blanc.free.fr/pub/temp/NSInternalConsistencyExceptionObjC.zip
(< 30 KB)
Scenario: Click on the "Edit" button; fill some text in the text area;
validate it with the "Submit" button -> You should get an error (see
below) in Xcode's "Run Log" window *most of the time* (otherwise,
repeat those steps until it comes!)
===
And for those who don't want to get this archive, here's the (stupid
simple) code:
[ObjC]
- (IBAction)edit:(id)sender
{
[drawer setContentView:editView];
}
- (IBAction)submit:(id)sender
{
[drawer setContentView:readView];
}
=> Error Log:
2005-05-21 20:23:06.492 NSInternalInconsistencyExceptionObjC[375] ***
Assertion failure in -[NSView
_gatherFocusStateInto:upTo:withContext:], AppKit.subproj/NSView.m:3125
2005-05-21 20:23:06.495 NSInternalInconsistencyExceptionObjC[375]
non-positive window number
===
or:
[Java]
public void edit(Object sender) { /* IBAction */
drawer.setContentView(editView);
}
public void submit(Object sender) { /* IBAction */
drawer.setContentView(readView);
}
=> Error Log:
<<
2005-05-21 20:25:53.199 NSInternalConsistencyException[454] ***
Assertion failure in -[NSView
_gatherFocusStateInto:upTo:withContext:], AppKit.subproj/NSView.m:3125
2005-05-21 20:25:53.281 NSInternalConsistencyException[454]
NSInternalInconsistencyException: non-positive window number
Stack Trace:
NSInternalInconsistencyException: non-positive window number
at com.apple.cocoa.application.NSDrawer.setContentView(Native Method)
at Controller.submit(Controller.java:20)
>>
===
If I still don't get any useful answer on this topic, I'll bug report
it to Apple. I'll tell you when it's done.
*THANKS* for your help,
--
— Frederic BLANC (email@hidden)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden