• 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:01:45 -0400

Thanks Graham.

I'm beginning to wonder if this will work at all?  It just occurred to
me that every time I click a popup-type link in my webView, that popup
is itself a new instance of MyDocument.  I don't see how I could add
that popup window as a child of the main window when they are separate
document instances.  I hope I am looking at this wrong.


A few sanity checks:

aSender is the child webView
[aSender window] is the child webView's window
theDocument is the child webView's document
[[theDocument webView] window] is the child webView's document's
window (say that fast!)

self is the parent document (class MyDocument)
[self webView] is the parent document's webView
[[self webView] window] is the parent document's webView's window


In my mind, I want to add the child window to the parent one:

[[[self webView] window] addChildWindow:[[theDocument webView] window]
ordered:NSWindowAbove];


I'll try this shortly.


Thanks,
-s


On Thu, Jul 31, 2008 at 1:43 AM, Graham Cox <email@hidden> wrote:
> NSDocument doesn't implement -window
>
> I think you're getting muddled about what "sender" is and the relationship
> between the document and other objects. Using addChildWindow: should be OK,
> once you've sorted this out.
>
> hth,
>
> Graham
>
> On 31 Jul 2008, at 2:51 pm, Sumner Trammell wrote:
>
>> but it doesn't work.  I get *** -[MyDocument window]: unrecognized
>> selector sent to instance 0x1613ab30 in the run log.
>
>
_______________________________________________

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>)
 >Re: Making child windows move with their parents (From: Graham Cox <email@hidden>)

  • Prev by Date: inspecting undo
  • Next by Date: Re: Making child windows move with their parents
  • 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