(no subject)
(no subject)
- Subject: (no subject)
- From: Ulrik Sverdrup <email@hidden>
- Date: Thu, 13 Mar 2003 20:45:14 +0100
Hello, my first question on this thread, and certainly a newbie one;
Can you lockFocus to a minimised window? I wonder because i have
managed to stop my app's crashing, but still it gives this message on
the console:
*** Assertion failure in -[DRFractalView lockFocus],
AppKit.subproj/NSView.m:2343
*** NSThread: ignoring exception 'NSInternalInconsistencyException'
(reason 'lockFocus sent to a view whose window is deferred and does not
yet have a corresponding platform window') that raised during delayed
perform of target 0x1a6d20 and selector 'drawingDidFinishNowDraw'
corresponding to code block:
- (id)drawingDidFinishNowDraw
{
[self lockFocus]; /// <<--- stopping here
[self clearDrawingArea];
[imageBitmap drawInRect:NSMakeRect(0, 0, pixelsWide, pixelsWide)];
[self unlockFocus];
[[self window] cacheImageInRect:[self frame]];
}
/ ---
which is triggered by sub-thread:
{ ....
[self performSelectorOnMainThread:@selector(drawingDidFinishNowDraw)
withObject:nil waitUntilDone:NO];
[pool release];
}
..and does not update the image in the window. So I wonder if this is
yet another collision of threads or if it simply i a question of
drawing to a minimised or hidden window.. what is the workaround? is
there a way to draw to the view without updating it at once; to force
the window to be visible seems to me as a awkward workaround...
thanks a lot. Ulrik Sverdrup
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.