Re: Yet another privileged-helper-tool question: how to launch from a system-preferences panel?

2016-01-14 Thread Motti Shneor
I could, but this is ugly and insecure, and I’m afraid if that Cocoa-App has any UI footprint, it’s also unacceptable in terms of user experience. Notice Apple’s own “Sharing” system-preference panel launches/quits daemons with no problem, though I don’t know if any of them runs privileged.

Re: Another CFTypeRef question

2016-01-14 Thread Kyle Sluder
On Thu, Jan 14, 2016, at 08:54 AM, Clark Cox wrote: > No. It does not change. A CF object has a single address for its > lifetime. > > > On Jan 14, 2016, at 06:42, Dave wrote: > > > > Hi, > > > > Does the pointer value of a CFTypeRef change during it’s lifetime? Can I

Re: drawRect: wrong scale in a programmatically created window

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 13:26 , Andreas Höschler wrote: > > This should in a view with size {851, 899} get me a purple line starting > close to the lower left corner and ending close to the top right corner. But > that's not the case. The picture is drawn zoomed in!?? I’m

Re: OT: Swift Code Autoformatter?

2016-01-14 Thread Graham Cox
> On 15 Jan 2016, at 7:57 AM, Quincey Morris > wrote: > > To clarify for lurkers, Swift requires a space after the “/“ in “numerator / > 2” because spaces aren’t just lexical white noise in Swift Hooray. I feel vindicated - I’ve always insisted on this

Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Alex Kac
Actually there is - the identifier. You set the NIB *and* the identifier. And I was able to make it work right after I sent the email (isn’t that how it is always?) It seems that my “isNarrow” property wasn’t being set by the time the view was loading where we were initializing it. I wasn’t

Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 15:09 , Alex Kac wrote: > > Actually there is - the identifier. You set the NIB *and* the identifier. Now that I’ve had time, I think I remember doing exactly this sometime in the past. How soon we forget. > And I was able to make it work right after I

Re: OT: Swift Code Autoformatter?

2016-01-14 Thread Eric E Dolecki
The compiler barks when you try things like that. You are your best code formatter :) Sent from my iP6+ > On Jan 14, 2016, at 8:15 PM, Graham Cox wrote: > > >> On 15 Jan 2016, at 7:57 AM, Quincey Morris >> wrote: >> >> To

NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Alex Kac
I have a NIB with two views that I want to use depending on circumstances. I call one “weatherCell” and one “weatherCellNarrow”. I register it like this: - (NSString*)identifierForWeatherCell { return _narrowView ? @"weatherCellNarrow":@"weatherCell"; } nib = [[NSNib alloc]

Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Ken Thomases
On Jan 14, 2016, at 4:38 PM, Alex Kac wrote: > > I have a NIB with two views that I want to use depending on circumstances. I > call one “weatherCell” and one “weatherCellNarrow”. > > I register it like this: > > - (NSString*)identifierForWeatherCell { > return

Re: NSTableView registerNib:forIdentifier: - multiple IDs in a single NIB

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 14:38 , Alex Kac wrote: > > I can’t seem to get a good answer to if this should work or not (having > multiple cellViews in one NIB). No. There are 2 top level objects in your nib, but there’s nothing that tells the table view machinery which one to use.

Re: OT: Swift Code Autoformatter?

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 17:15 , Graham Cox wrote: > > That’ll shut them up … Unfortunately not. I got in a huge fight with someone in the developer forums a year ago over this. This person was of the opinion that the inability to tolerate missing spaces was characteristic

drawRect: wrong scale in a programmatically created window

2016-01-14 Thread Andreas Höschler
Hi all, I have a command line tool in a Terminal session (service) that generates PNGs via NSBezierPath drawing. In this tool I create the view and corresponding window like so mapView = [[ESMMapView alloc] initWithFrame:NSMakeRect(0, 0, _imageSize.width, _imageSize.height)];

Re: OT: Swift Code Autoformatter?

2016-01-14 Thread Quincey Morris
On Jan 14, 2016, at 12:36 , Charles Jenkins wrote: > > I keep eyeing a program that you can install to work with Xcode and > autoformat source code. You know, things like automatically fixing spacing > around arithmetic operators and other important types of punctuation.

OT: Swift Code Autoformatter?

2016-01-14 Thread Charles Jenkins
I keep eyeing a program that you can install to work with Xcode and autoformat source code. You know, things like automatically fixing spacing around arithmetic operators and other important types of punctuation. This is oddly important in Swift, where the compiler can’t interpret things like

Another CFTypeRef question

2016-01-14 Thread Dave
Hi, Does the pointer value of a CFTypeRef change during it’s lifetime? Can I safely uses the string value of the pointer %p as a key to a dictionary? All the Best Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Another CFTypeRef question

2016-01-14 Thread Clark Cox
No. It does not change. A CF object has a single address for its lifetime. > On Jan 14, 2016, at 06:42, Dave wrote: > > Hi, > > Does the pointer value of a CFTypeRef change during it’s lifetime? Can I > safely uses the string value of the pointer %p as a key to a