• 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
Re: Making child windows move with their parents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making child windows move with their parents


  • Subject: Re: Making child windows move with their parents
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 30 Jul 2008 22:45:06 -0700


On 30 Jul '08, at 9:51 PM, Sumner Trammell wrote:

but it doesn't work.  I get *** -[MyDocument window]: unrecognized
selector sent to instance 0x1613ab30 in the run log.

aSender is the WebView in the main window.
self is the MyDocument object, and it has a window outlet that I can
see when I right-click the File's Owner in IB.

Look at your code. You tried to send -window to a MyDocument object, which is a subclass of NSDocument:


[[self window] addChildWindow:[aSender window] ordered:NSWindowAbove];

There is no such method (because documents can have multiple windows, so there's no sensible result.)


You must have gotten a warning about this at compile time. *Do not ignore such warnings*. They should be treated as error messages because, nearly always, they indicate a situation that will throw an exception at runtime, causing your app to fail. I recommend turning on the "treat warnings as errors" build config checkbox.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Making child windows move with their parents
      • From: "Sumner Trammell" <email@hidden>
References: 
 >Making child windows move with their parents (From: "Sumner Trammell" <email@hidden>)

  • Prev by Date: Re: Making child windows move with their parents
  • Next by Date: Re: Multithreaded file read
  • Previous by thread: Re: Making child windows move with their parents
  • Next by thread: Re: Making child windows move with their parents
  • Index(es):
    • Date
    • Thread