NSMenuItem : acceptsFirstMouse(forEvent: NSEvent)

2019-09-24 Thread Mark Wade via Cocoa-dev
Hi All,

I’m at a loss here.  I’ve created a statusbar item, using Swift 5, whose first 
menu item is a textwithstepper NSDatePicker which I created by setting the menu 
item’s view. This all works fine when run from within XCode.  Running the app 
directly still works, however I can’t select the fields to change with the 
stepper, why it works in Xcode and not without I don’t know. So, I’m thinking I 
have to implement acceptsFirstMouse(for event:) to return true, I think.

I’ve subclassed NSMenuItem and overridden acceptsFirstMouse( for event:) but 
then how do I add the NSDatePicker? I can’t override the NSMenuItem view 
variable, if I set the view to my subclass and then set the view to the 
datepicker, it’s not my subclass anymore. I’ve been over and over this and I’m 
just not getting it.

A clue, a pointer, an example, anything would be appreciated.

— Mark

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


kCAFilterTrilinear

2019-09-24 Thread Gabriel Zachmann via Cocoa-dev
I am trying out the scaling filter kCAFilterTrilinear on a CALayer.
In the doc it says 
"Some renderers may ignore this, or impose additional restrictions, such as 
source images requiring power-of-two dimensions"

Does anyone know what filter CALayer falls back to, when it ignores 
kCAFilterTrilinear ?
And what does it do when "additional restrictions" are imposed, but my images 
don't meet them?

Thanks a lot in advance for all kinds of insights.

Best regards, Gabriel



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com