Re: Sometimes all my menus are disabled

2017-02-14 Thread Alastair Houghton
On 14 Feb 2017, at 22:15, Graham Cox wrote: > >> On 15 Feb 2017, at 12:39 AM, Andreas Falkenhahn >> wrote: >> >> I knew how to use IB on the old PowerPC Mac, >> but that was 10 years ago. > > Well, it hasn’t changed that much in principle. In

Re: Are instances of a NSManagedObject subclass usable as regular objects?

2017-02-14 Thread Jens Alfke
> On Feb 14, 2017, at 3:16 PM, Daryle Walker wrote: > > How do I give managed objects enough permanence to be used with systems > expecting normal objects? Managed objects are regular NSObjects and are ref-counted the same way. To keep one around, just use a regular strong

Re: makeKeyAndOrderFront not working

2017-02-14 Thread Ken Thomases
On Feb 14, 2017, at 3:44 PM, James Walker wrote: > > I have a situation where makeKeyAndOrderFront is making a window visible but > not key. Just before this call, [theWindow canBecomeKeyWindow] returns YES, > and just after, [NSApp keyWindow] returns nil. Clicking

Re: Are instances of a NSManagedObject subclass usable as regular objects?

2017-02-14 Thread Daryle Walker
Looking at my code again, I had a massive brain-fart. I created all the data objects with local “let,” but forgot to assign the top-level object to my document’s data property. Once I did that, the window doesn’t show up at all due to a different problem: > 2017-02-14 18:43:00.018210

Are instances of a NSManagedObject subclass usable as regular objects?

2017-02-14 Thread Daryle Walker
I’m on macOS Sierra, running Swift 3 on Xcode 8. I started the basic document-based project, with storyboards but without Core Data. The main window has a table view and a text view. I connected them to my document’s data object with Cocoa Bindings. I put in sample data into the object and the

Re: Sometimes all my menus are disabled

2017-02-14 Thread Graham Cox
> On 15 Feb 2017, at 12:39 AM, Andreas Falkenhahn > wrote: > > I knew how to use IB on the old PowerPC Mac, > but that was 10 years ago. Well, it hasn’t changed that much in principle. In fact it’s got a lot better in most respects because it stays in sync with your

makeKeyAndOrderFront not working

2017-02-14 Thread James Walker
I have a situation where makeKeyAndOrderFront is making a window visible but not key. Just before this call, [theWindow canBecomeKeyWindow] returns YES, and just after, [NSApp keyWindow] returns nil. Clicking on the window title bar does not make it key. However, if I bring some other app

Re: No prompt for Location Services

2017-02-14 Thread Laurent Daudelin
Yeah, that was it. Completely missed that one. Thanks Saagar. -Laurent. -- Laurent Daudelin laur...@nemesys-soft.com AIM/iChat/Skype:LaurentDaudelin

Re: Table selection and bindings

2017-02-14 Thread John Brownie
OK, that makes sense. Tracing through, I do have a reloadData call, so I'll ensure that the selection gets maintained after that. Yes, there is a mixture of data source and bindings, with the table view relying on data source and a bit of KVO, while the inspector relies on bindings. Things

Re: Table selection and bindings

2017-02-14 Thread Quincey Morris
On Feb 14, 2017, at 09:25 , Keary Suska wrote: > >> On Feb 14, 2017, at 8:37 AM, John Brownie > > wrote: >> >> Am I doing things incorrectly, or is there something that I can do to ensure >> that the change to the

Re: No prompt for Location Services

2017-02-14 Thread Saagar Jha
You may have already done this, but you’ll need to call CLLocationManager’s requestAlwaysAuthorization() method for the prompt. Saagar Jha > On Feb 14, 2017, at 10:01 AM, Laurent Daudelin > wrote: > > Adding features to an app under iOS 10 that needs to access the

Re: Throwing an error from a NSDocument.init override

2017-02-14 Thread Quincey Morris
On Feb 14, 2017, at 00:26 , Daryle Walker wrote: > > But I can’t call the “super” versions of those other initializers from within > my override. This is the essence of your problem. Your “override” cannot be a convenience initializer because convenience initializers cannot

No prompt for Location Services

2017-02-14 Thread Laurent Daudelin
Adding features to an app under iOS 10 that needs to access the location services. So, I added the “NSLocationWhenInUseUsageDescription” with a description. When checking Privacy -> Location Services, I see my app there with 2 choices: “While using the app” and “Never”. But none is checked. I

Re: Table selection and bindings

2017-02-14 Thread Keary Suska
> On Feb 14, 2017, at 8:37 AM, John Brownie wrote: > > I have an NSTableView in a document window, and a utility window which > functions as an inspector, so its content is bound to the selected object in > the table in the document window. Everything seems fine, but

Re: Table selection and bindings

2017-02-14 Thread Steve Mills
On Feb 14, 2017, at 09:38 AM, John Brownie wrote: I have an NSTableView in a document window, and a utility window which functions as an inspector, so its content is bound to the selected object in the table in the document window. Everything seems fine, but there is a

Table selection and bindings

2017-02-14 Thread John Brownie
I have an NSTableView in a document window, and a utility window which functions as an inspector, so its content is bound to the selected object in the table in the document window. Everything seems fine, but there is a place which doesn't function as I expect. In the inspector, I can change

Re: Sometimes all my menus are disabled

2017-02-14 Thread Andreas Falkenhahn
On 14.02.2017 at 15:02 じょいすじょん wrote: >> On Feb 14, 2017, at 1:58, Andreas Falkenhahn wrote: >> On 13.02.2017 at 17:33 じょいすじょん wrote: >>> Yeah, my first suggestion didn't work, but points out the problem overall >>> in you nib. >>> Looks like somebody did try to edit

Re: Sometimes all my menus are disabled

2017-02-14 Thread じょいすじょん
> On Feb 14, 2017, at 1:58, Andreas Falkenhahn wrote: > > On 13.02.2017 at 17:33 じょいすじょん wrote: > >> Yeah, my first suggestion didn't work, but points out the problem overall in >> you nib. >> Looks like somebody did try to edit the xml before and munged it. > > I

Re: Sometimes all my menus are disabled

2017-02-14 Thread Andreas Falkenhahn
On 13.02.2017 at 23:13 Graham Cox wrote: > The problem here is that you seem unwilling to take a little time > to learn the basics of Interface Builder. No, that's not the problem here. I knew how to use IB on the old PowerPC Mac, but that was 10 years ago. Now I'm trying to compile this old

Throwing an error from a NSDocument.init override

2017-02-14 Thread Daryle Walker
The parameter-less version of “init” in NSDocument can’t throw. It’s suggesting to (save the error somehow and then) throw the error from one of the other initializers. This counts on the fact that you won’t initialize a NSDocument (subclass) instance with no parameters, but call one of the