• 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: NSOpenPanel accessoryView clicks must hit pixels to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOpenPanel accessoryView clicks must hit pixels to work


  • Subject: Re: NSOpenPanel accessoryView clicks must hit pixels to work
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 30 Mar 2015 18:14:17 +0200

> On 30 Mar 2015, at 11:09, Mike Abdullah <email@hidden> wrote:
>
>
>> On 30 Mar 2015, at 08:19, Steve Mills <email@hidden> wrote:
>>
>> OK, this is really weird. I just added an accessoryView to an NSOpenPanel. The view contains only a checkbox style NSButton. When testing it, it seemed like the clicks on this button's title didn't always take. It appears that the only clicks that work are clicks that are on the checkbox itself or the button title's rendered pixels. Like I can't click the space between the ascenders in "Add", but must click the actual ascenders in each 'd'. Same with the descender in a 'y'.
>>
>> I'm on 10.10.2. Can anyone confirm this? Here's how I'm running it:
>>
>> NSOpenPanel*				panel = [NSOpenPanel openPanel];
>> AddAssetAccessoryView*		accessory = [[AddAssetAccessoryView alloc] initWithNibName:@"AddAssetAccessoryView" bundle:nil];
>>
>> panel.accessoryView = accessory.view;
>>
>> [panel beginSheetModalForWindow:self.windowForSheet completionHandler:^(NSInteger result) {
>> }
>
> I think I’ve been seeing the same thing, and not been able to quite put my figure on it. Is your app sandboxed?

Makes sense considering that sandboxed apps don't run their own open panel. Instead the accessory view appears to be hosted in a borderless window that gets attached (at the Window Server level, I'd presume) to the actual open panel that runs in the PowerBox process. So it'd probably just let through any clicks in transparent areas to PowerBox in the underlying window.

A workaround would probably be to use a plain NSBox as your accessory view and fill it with a solid color (e.g. an opaque version of the color that a standard-appearance NSBox uses to fill itself). of course that'd run the risk of looking a bit ugly if Apple changes the color used for that. I don't see an obvious color for NSBox contents in  NSColor.h.

-- Uli
http://stacksmith <http://stacksmith/>.org
_______________________________________________

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: NSOpenPanel accessoryView clicks must hit pixels to work
      • From: Steve Mills <email@hidden>
References: 
 >NSOpenPanel accessoryView clicks must hit pixels to work (From: Steve Mills <email@hidden>)
 >Re: NSOpenPanel accessoryView clicks must hit pixels to work (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: NSOpenPanel accessoryView clicks must hit pixels to work
  • Next by Date: Re: NSOpenPanel accessoryView clicks must hit pixels to work
  • Previous by thread: Re: NSOpenPanel accessoryView clicks must hit pixels to work
  • Next by thread: Re: NSOpenPanel accessoryView clicks must hit pixels to work
  • Index(es):
    • Date
    • Thread