• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
lockFocus error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lockFocus error


  • Subject: lockFocus error
  • From: DKJ <email@hidden>
  • Date: Mon, 20 Oct 2008 08:21:14 -0700

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 (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


  • Follow-Ups:
    • Re: lockFocus error
      • From: Graham Cox <email@hidden>
    • Re: lockFocus error
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Mutable arrays
  • Next by Date: Re: [OT] How do people use and contribute to this list?
  • Previous by thread: Re: Custom button cells for NSMatrix
  • Next by thread: Re: lockFocus error
  • Index(es):
    • Date
    • Thread