Re: NSDocument willPresentError(_:) in Swift 4 : Override not called

2017-06-30 Thread Jerome Krinock
> On 2017 Jun 29, at 23:37, Quincey Morris > wrote: > > You would get an error trying to declare the override if it did not have the > correct method signature. Yes, of course. To be honest, most of the time, I don't really *write* Swift. I throw some characters onto the screen and click “

Re: Focus ring of NSComboBox and text field visible through overlaid views

2017-06-30 Thread Navneet Kumar
Hi, Thanks for the reply. Yes I admit that question was at best vague. And the last couple of lines of your email says correctly, that I have to float alerts on top of the rest of the window contents. But not just alerts…. Here is the scenario: I have the window with a lot of UI elements like a

NSWindow non-integer point sizes? (on Retina dispays)

2017-06-30 Thread Sean McBride
Hi, Does anyone know what NSWindow's initWithContentRect: behaviour is with non-integer contentRect? The docs don't say. It seems that, on a retina display, window size can only be an even number of pixels (ie an integer number of points). (I ask because I have some cross-platform OpenGL-bas

Re: NSDocument willPresentError(_:) in Swift 4 : Override not called

2017-06-30 Thread Quincey Morris
On Jun 30, 2017, at 06:03 , Jerome Krinock wrote: > > To be honest, most of the time, I don't really *write* Swift. I throw some > characters onto the screen and click “Fix” You’re Doing It Wrong™. You’re supposed to throw fewer characters onto the screen and press Return to autocomplete. Us

Re: Focus ring of NSComboBox and text field visible through overlaid views

2017-06-30 Thread Quincey Morris
On Jun 30, 2017, at 08:07 , Navneet Kumar wrote: > > I also have a small project uploaded […] > > Which shows both the focus ring problem and tooltip problem I don’t know why, but the focus ring doesn’t bleed through for me (Xcode 9, macOS 10.12). However, I think your solution in the test pr

Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-06-30 Thread Quincey Morris
On Jun 30, 2017, at 10:26 , Sean McBride wrote: > > Does anyone know what NSWindow's initWithContentRect: behaviour is with > non-integer contentRect? Not really, but is there a reason why you can’t just try it? My guess would be that the window’s backing store would be pixel- or point-aligne

Leak in NSDocument Edge Case

2017-06-30 Thread Jerome Krinock
It looks to me that, in the edge case where user clicks File : Duplicate and then enters a file path/name that already exists in the filesystem, so that Cocoa prompts to "Replace" or "Cancel", the new NSDocument object gets four (4) unbalanced retains, and therefore leaks. This is reproducible

Re: NSWindow non-integer point sizes? (on Retina dispays)

2017-06-30 Thread Ken Thomases
On Jun 30, 2017, at 12:26 PM, Sean McBride wrote: > > Does anyone know what NSWindow's initWithContentRect: behaviour is with > non-integer contentRect? The docs don't say. It seems that, on a retina > display, window size can only be an even number of pixels (ie an integer > number of point

Re: Focus ring of NSComboBox and text field visible through overlaid views

2017-06-30 Thread Navneet Kumar
Hi, Thanks for the valuable insights. I think I’m gonna go with child windows and not sheets as I have to support os x 10.7. Thanks again, Navneet > On 30-Jun-2017, at 11:25 PM, Quincey Morris > wrote: > > On Jun 30, 2017, at 08:07 , Navneet Kumar > wrote: >> >> I