• 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 and NSView sizes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow and NSView sizes


  • Subject: Re: NSWindow and NSView sizes
  • From: Lance Bland <email@hidden>
  • Date: Mon, 15 Apr 2002 17:20:15 -0400

On Monday, April 15, 2002, at 04:34 PM, Cyril Godefroy wrote:

Although I looked several times in the doc, I cannot find the way to add a NSView to a NSWindow that won't automagically scale to the NSWindow's size.

change this code:

fsMovieView = [[[QTKitFSView alloc] retain] initWithFrame:fsRect withParent:self];
...
[fsWindow setBackgroundColor:[NSColor blackColor]];
[fsWindow setLevel:windowLevel];
[fsWindow setContentView: fsMovieView];

to this:

fsMovieView = [[QTKitFSView alloc] initWithFrame:fsRect withParent:self]; // fsMovieView retain count 1
...
[fsWindow setBackgroundColor:[NSColor blackColor]];
[fsWindow setLevel:windowLevel];
[[fsWindow contentView] addSubview:fsMovieView]; // fsMovieView retain count 2
[fsMovieView release]; // fsMovieView retain count 1

i.e.: add it as a subview and fix the retain count issues. Don't send a message to an instance (like the first retain in your code) until you fully initialize it. also, I think you mean to say automagically resize (not scale).

p.s.: code not tested.

-lance


------------------------------------
Lance Bland
mailto:email@hidden
web charts at http://www.vvi.com/products/chart
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSWindow and NSView sizes (From: Cyril Godefroy <email@hidden>)

  • Prev by Date: Re: NSTextView Custom Class "Not Applicable"
  • Next by Date: Possible stupid question
  • Previous by thread: NSWindow and NSView sizes
  • Next by thread: Re: NSWindow and NSView sizes
  • Index(es):
    • Date
    • Thread