• 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
Looking for better solution than this old hack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Looking for better solution than this old hack


  • Subject: Looking for better solution than this old hack
  • From: Graham Cox <email@hidden>
  • Date: Wed, 18 Jul 2012 14:27:07 +1000

My app has floating palettes that generally set [NSPanel setBecomesKeyOnlyIfNeeded:YES]; Most of the time these palettes are therefore inactive, and yet provide a large number of useful controls that work as expected when operated. Problem is, a lot of these controls show the inactive state because the window is inactive. (This isn't actually very consistent, it depends on the control style chosen).

In the past, I have used a hack to fool controls into thinking they were in a window that was active when it actually wasn't, by subclassing NSPanel and overriding:

- (BOOL)	_hasActiveControls
{
	return YES;
}


This no longer seems to work since some versions ago, as well as being undocumented, and inapplicable for the App Store and so on.

I'd like to know if there is a supported way to do this. It seems a bit crazy that floating panels even bother modulating the active state of controls when they are floating and are *always* effectively active, and it looks better and is more usable as well.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Looking for better solution than this old hack
      • From: Uli Kusterer <email@hidden>
    • Re: Looking for better solution than this old hack
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: looking for a memory problem
  • Next by Date: Sizing NSTableView to data
  • Previous by thread: Re: How can I convince an NSBigMutableString to become a mere NSAttributedString ?
  • Next by thread: Re: Looking for better solution than this old hack
  • Index(es):
    • Date
    • Thread