• 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: Fullscreen code not working (code revisions)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fullscreen code not working (code revisions)


  • Subject: Re: Fullscreen code not working (code revisions)
  • From: Ricky Sharp <email@hidden>
  • Date: Sat, 11 Jun 2005 10:49:43 -0500

On Jun 11, 2005, at 10:29 AM, Rhon Fitzwater wrote:

I have not gotten any responses from the list yet.

Writing into the list doesn't guarantee that you'll ever receive a response. If something is critical, contact email@hidden at which point you may be required to use a DTS incident.


- (NSWindow *)beginFullScreen
{ fsWindow = [
[NSWindow alloc]
initWithContentRect:[[NSScreen mainScreen] frame]
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
NSView *fsView=[[NSView alloc] initWithFrame:[fsWindow frame]];
[fsWindow setContentView:fsView];
NSImageView *fsImage = [[NSImageView alloc] initWithFrame: [fsView frame]];
[fsView addSubview:fsImage];
[fsWindow setBackgroundColor:[NSColor whiteColor]];
[NSMenu setMenuBarVisible:NO];
[fsWindow setHasShadow: NO];


[fsWindow makeKeyAndOrderFront:fsWindow];
return fsWindow;
}
//- (NSWindow *)endFullScreen;//again commented out because it did not fix the crash
- (void) endFullScreen;
{ [NSMenu setMenuBarVisible:YES];


[fsWindow close];
[fsWindow release];
// return fsWindow; //I commented this out because it did not fix the crash.
}
@end

By default, windows are released when they are closed. You've just been lucky that the code has "worked" in earlier versions of the OS. I've seen cases where you can always reproduce the crash in Panther.


If you need to manually release the window yourself, you need to set [theWindow setReleasedWhenClosed:NO];

Typically you should rely on the default behavior though (i.e. let the framework release the window when you close it). And, since you're releasing the window right after you close it, go with the default behavior (i.e. remove the [fsWindow release]).

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________
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: Fullscreen code not working (From: Rhon Fitzwater <email@hidden>)
 >Fullscreen code not working (code revisions) (From: Rhon Fitzwater <email@hidden>)
 >Re: Fullscreen code not working (code revisions) (From: Rhon Fitzwater <email@hidden>)

  • Prev by Date: Re: Passing more than 1 variable to a method/function
  • Next by Date: Re: Still can't figure out this overrelease bug
  • Previous by thread: Re: Fullscreen code not working (code revisions)
  • Next by thread: binding window titles
  • Index(es):
    • Date
    • Thread