• 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: "Sumner Trammell" <email@hidden>
  • Date: Thu, 31 Jul 2008 13:02:32 -0400

Thanks Jens.

I'll change that config.  I did see the warning, but figured I would
run it anyway.

In a document-based app created using the Xcode template, there is in
fact a window outlet on File's Owner, which in this case is of class
MyDocument.  What does that window outlet actually represent?


-s





On Thu, Jul 31, 2008 at 1:45 AM, Jens Alfke <email@hidden> wrote:
>
> 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
_______________________________________________

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

References: 
 >Making child windows move with their parents (From: "Sumner Trammell" <email@hidden>)
 >Re: Making child windows move with their parents (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Making child windows move with their parents
  • Next by Date: Re: inspecting undo
  • Previous by thread: Re: Making child windows move with their parents
  • Next by thread: Bindings to simulate spreadsheet functions in NSTableView?
  • Index(es):
    • Date
    • Thread