• 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: NSWindow's setContentView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow's setContentView


  • Subject: Re: NSWindow's setContentView
  • From: Drarok Ithaqua <email@hidden>
  • Date: Mon, 19 Jun 2006 20:41:54 +0100


On 19 Jun 2006, at 4:35 pm, Shawn Erickson wrote:

Something is likely wrong in how you are swapping things around (or a bug in the framework but those happen very seldom). I move views between windows all the time (just need to make sure you are moving the correct view... some items you drop from IB into a nib are in fact contained in a parent view... say a scroller view).

After much confusion and testing with other Views, it seems to be a very small issue with NSMovieView, but I've also found the workaround.


With one of the other views I was testing with, [mainWindow setContentView:theView]; worked perfectly as expected, but with NSMovieView, it resized the view correctly, but still displayed it inside the original window!
I solved it like so:
[movieView retain];
[movieView removeFromSuperview]; // This is the line that fixes all.
[mainWindow setContentView:movieView];
[movieView release];


After that, it all looks right. The movieView's retainCount stays level at 2. Awesome!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Re: NSWindow's setContentView (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Problem binding to MOC from a separate nib, solved but not satisfactorily
  • Next by Date: Getting average power / peak power (sound monitoring)
  • Previous by thread: Re: NSWindow's setContentView
  • Next by thread: [ANN] BuildFactory 1.0 released
  • Index(es):
    • Date
    • Thread