• 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: window shadow and setAlphaValue bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window shadow and setAlphaValue bug?


  • Subject: Re: window shadow and setAlphaValue bug?
  • From: Shawn Erickson <email@hidden>
  • Date: Sun, 19 Nov 2006 19:22:54 -0800


On Nov 19, 2006, at 6:39 PM, Ivan Kourtev wrote:

I am running 10.4.8 on a PPC (G5) and am creating a regular window with NStitledWindowMask.

You're right, your code doesn't exhibit the behavior I described -- I think it is because you set the alpha Value in the initializer. If you set the alpha value after the window is up it does the same thing - shows a shadow.

This is what I was doing for my little experiment:

1. Start a new project type Cocoa Application
2. Open the MainMenu.nib and delete the window
3. Create a subclass AppController of NSObject
4. Instantiate AppController
5. Make it the delegate of the app (File's Owner)
6. Create the files for AppController
7. Add the following method to AppController.m

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSWindow *window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100,100,600,600)
styleMask:NSTitledWindowMask
backing:NSBackingStoreBuffered
defer:YES];


  [window setHasShadow:NO];
  [window orderFront:self];
  [window setAlphaValue:0.75];
}

Try adding -[NSWindow invalidateShadow] and see if that helps (may have to follow it with updateWindow).


-Shawn
_______________________________________________
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: window shadow and setAlphaValue bug?
      • From: Ivan Kourtev <email@hidden>
References: 
 >window shadow and setAlphaValue bug? (From: Ivan Kourtev <email@hidden>)
 >Re: window shadow and setAlphaValue bug? (From: Ricky Sharp <email@hidden>)
 >Re: window shadow and setAlphaValue bug? (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: Re: window shadow and setAlphaValue bug?
  • Next by Date: Re: window shadow and setAlphaValue bug?
  • Previous by thread: Re: window shadow and setAlphaValue bug?
  • Next by thread: Re: window shadow and setAlphaValue bug?
  • Index(es):
    • Date
    • Thread