Re: NSTreeController selection and Swift

2016-05-24 Thread Rick Mann
> On May 24, 2016, at 23:45 , Quincey Morris > wrote: > > On May 24, 2016, at 23:26 , Rick Mann wrote: >> >> Eh, I think I'll just use my current workaround using NSOutlineView methods. > > Really? There’s nothing wrong with using ‘selectedObjects’. The only drawback > is that it has to cre

Re: NSTreeController selection and Swift

2016-05-24 Thread Quincey Morris
On May 24, 2016, at 23:26 , Rick Mann wrote: > > Eh, I think I'll just use my current workaround using NSOutlineView methods. Really? There’s nothing wrong with using ‘selectedObjects’. The only drawback is that it has to create an actual NSArray each time you ask for it, but that’s not a mean

Re: NSTreeController selection and Swift

2016-05-24 Thread Rick Mann
> On May 24, 2016, at 19:34 , Quincey Morris > wrote: > > On May 24, 2016, at 18:01 , Rick Mann wrote: >> >> That's what I tried, but .selection is always _NSControllerObjectProxy, and >> the resulting conditional cast never triggers. > > Urg. You could assigning treeController.selection.se

Re: NSTreeController selection and Swift

2016-05-24 Thread Rick Mann
> On May 24, 2016, at 21:24 , Jerry Krinock wrote: > > This may not work even if you work through the Swift issues. > > In Objective-C, the selection, selection indexes, and selected objects are > all *not* observeable as documented in NSArrayController. See Apple Bug > 7827354, clos

Re: NSTreeController selection and Swift

2016-05-24 Thread Jerry Krinock
This may not work even if you work through the Swift issues. In Objective-C, the selection, selection indexes, and selected objects are all *not* observeable as documented in NSArrayController. See Apple Bug 7827354, closed as duplicate of 3404770. Assuming that NSTreeController is somehow b

Re: NSTreeController selection and Swift

2016-05-24 Thread Quincey Morris
On May 24, 2016, at 18:01 , Rick Mann wrote: > > That's what I tried, but .selection is always _NSControllerObjectProxy, and > the resulting conditional cast never triggers. Urg. You could assigning treeController.selection.self to an AnyObject variable, and see if that retrieves the object it

Re: NSTreeController selection and Swift

2016-05-24 Thread Rick Mann
> On May 24, 2016, at 17:58 , Quincey Morris > wrote: > > On May 24, 2016, at 17:49 , Rick Mann wrote: >> >> I'm trying to observe an NSTreeController's selection property, and then do >> something with that selection when it changes. But Swift doesn't just let me >> treat .selection as my

Re: NSTreeController selection and Swift

2016-05-24 Thread Quincey Morris
On May 24, 2016, at 17:49 , Rick Mann wrote: > > I'm trying to observe an NSTreeController's selection property, and then do > something with that selection when it changes. But Swift doesn't just let me > treat .selection as my object type (the way Obj-C would). So, can I use it > (short of c

NSTreeController selection and Swift

2016-05-24 Thread Rick Mann
I'm trying to observe an NSTreeController's selection property, and then do something with that selection when it changes. But Swift doesn't just let me treat .selection as my object type (the way Obj-C would). So, can I use it (short of calling -valueForKey:) from Swift? -- Rick Mann rm...@la

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Doug Hill
> On May 24, 2016, at 4:38 PM, Doug Hill wrote: > > >> On May 24, 2016, at 3:48 PM, Kyle Sluder wrote: >> >> On Tue, May 24, 2016, at 05:46 PM, Kyle Sluder wrote: >>> On Tue, May 24, 2016, at 05:37 PM, Alex Zavatone wrote: On May 24, 2016, at 4:02 PM, Kyle Sluder wrote: >

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Doug Hill
> On May 24, 2016, at 3:48 PM, Kyle Sluder wrote: > > On Tue, May 24, 2016, at 05:46 PM, Kyle Sluder wrote: >> On Tue, May 24, 2016, at 05:37 PM, Alex Zavatone wrote: >>> >>> On May 24, 2016, at 4:02 PM, Kyle Sluder wrote: >>> On Tue, May 24, 2016, at 12:33 PM, Doug Hill wrote: > OK,

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Doug Hill
> On May 24, 2016, at 1:02 PM, Kyle Sluder wrote: > > On Tue, May 24, 2016, at 12:33 PM, Doug Hill wrote: >> OK, this might have been more obvious to people, but it finally came to >> me how to handle the keyboard display. >> >> Instead of changing the view size, I move the center of the view up

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Kyle Sluder
On Tue, May 24, 2016, at 05:46 PM, Kyle Sluder wrote: > On Tue, May 24, 2016, at 05:37 PM, Alex Zavatone wrote: > > > > On May 24, 2016, at 4:02 PM, Kyle Sluder wrote: > > > > > On Tue, May 24, 2016, at 12:33 PM, Doug Hill wrote: > > >> OK, this might have been more obvious to people, but it fina

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Kyle Sluder
On Tue, May 24, 2016, at 05:37 PM, Alex Zavatone wrote: > > On May 24, 2016, at 4:02 PM, Kyle Sluder wrote: > > > On Tue, May 24, 2016, at 12:33 PM, Doug Hill wrote: > >> OK, this might have been more obvious to people, but it finally came to > >> me how to handle the keyboard display. > >> > >>

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Alex Zavatone
On May 24, 2016, at 4:02 PM, Kyle Sluder wrote: > On Tue, May 24, 2016, at 12:33 PM, Doug Hill wrote: >> OK, this might have been more obvious to people, but it finally came to >> me how to handle the keyboard display. >> >> Instead of changing the view size, I move the center of the view up, th

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Kyle Sluder
On Tue, May 24, 2016, at 12:33 PM, Doug Hill wrote: > OK, this might have been more obvious to people, but it finally came to > me how to handle the keyboard display. > > Instead of changing the view size, I move the center of the view up, then > apply a content inset to the table to adjust for th

Re: NSSplitViewController contents are shifted at first

2016-05-24 Thread Rick Mann
Well, I copied-and-pasted the relevant bits into a new project, and it doesn't exhibit the same vertical-shift behavior. So I deleted and re-created the relevant scenes in the original project, and it still exhibits the behavior. I don't know what to do. > On May 22, 2016, at 09:24 , Jerry Krin

Re: Scrolling table view when the keyboard appears

2016-05-24 Thread Doug Hill
OK, this might have been more obvious to people, but it finally came to me how to handle the keyboard display. Instead of changing the view size, I move the center of the view up, then apply a content inset to the table to adjust for the part of the table offscreen. Animations seem to work much

Re: NSDocument not displaying save prompt on dirty document

2016-05-24 Thread livinginlosangeles
I never knew that was an option. I turned it on. Restarted my application, but still no prompt to save my dirty NSDocument when I close it. Any further ideas? On May 24, 2016, at 12:29 AM, Graham Cox wrote: > >> On 24 May 2016, at 3:52 PM, livinginlosange...@mac.com wrote: >> >> I have an NSD

Re: NSDocument not displaying save prompt on dirty document

2016-05-24 Thread Graham Cox
> On 24 May 2016, at 3:52 PM, livinginlosange...@mac.com wrote: > > I have an NSDocument subclass that is no longer displaying a save prompt when > I close a dirty document using the close: IBAction. My document is marked as > dirty and I am using the NSDocument’s NSUndoManager. I am not doing