I have a custom view in a window, set as an instance of MyView, and
connected to my controller as an IBOutlet theView. When I do this in
the controller's awakeFromNib method:
[theView lockFocus];
I get this error:
*** Assertion failure in -[MyView lockFocus], /SourceCache/AppKit/
AppKit-949.35/AppKit.subproj/NSView.m:4755
An uncaught exception was raised
-[MyView(0x139a20) lockFocus] failed with window=0x135f70,
windowNumber=-1, [self isHiddenOrHasHiddenAncestor]=0
*** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: '-[MyView(0x139a20)
lockFocus] failed with window=0x135f70, windowNumber=-1, [self
isHiddenOrHasHiddenAncestor]=0'
The window's "visible at launch" box is checked in IB, so shouldn't it
be available when awakeFromNib is called?
_______________________________________________
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 [EMAIL PROTECTED]