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

Fullscreen code not working


  • Subject: Fullscreen code not working
  • From: rfitz <email@hidden>
  • Date: Sun, 5 Jun 2005 11:40:42 -0400

I have attached Fullscreen.h and Fullscreen.m below.  In my ASS code I
use these two lines to open the fullscreen window:
    set theWindow to (call method "beginFullScreen")
    set content view of theWindow to content view of window "template"

Open the fullscreen window works perfect.  In the fullscreen window, I
have a button (close) which the user clicks to close the window.  When
the user clicks the close button this code is executed:
    set theWindow to (call method "endFullScreen")
The fullscreen window closes, but then after about 1 or 2 seconds my
program crashes.  This code worked in 10.3, but it is not working in
10.4 for some reason.  Can anyone see what is going wrong here?

Any help would be appreciated.

Thanks,

-Rhon Fitzwater

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
@interface NSApplication (ASKAFullScreen)
- (NSWindow *)beginFullScreen;
- (void)endFullScreen;
@end


#import "FullScreen.h"
NSWindow *fsWindow;
@implementation NSApplication (ASKAFullScreen)
- (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:0];
       [fsWindow setHasShadow: NO];

   [fsWindow makeKeyAndOrderFront:fsWindow];
   return fsWindow;
}
- (void)endFullScreen
{   [NSMenu setMenuBarVisible:1];

   [fsWindow close];
}
@end
 _______________________________________________
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

  • Follow-Ups:
    • Re: Fullscreen code not working
      • From: Ian was here <email@hidden>
    • Re: Fullscreen code not working
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: Fitting a string to a box?
  • Next by Date: Launch issue...
  • Previous by thread: Fullscreen code not working
  • Next by thread: Re: Fullscreen code not working
  • Index(es):
    • Date
    • Thread