Re: NSWindow and NSView sizes
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.