Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Andy Lee
Whoops, meant for this to go to the list: On Jun 24, 2016, at 6:22 PM, Martin Wierschin wrote: > >>> It almost looks like the ability to pre-select a file was deliberately >>> removed from the NSOpenPanel API. > > > Whatever the reason for removing this feature from

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Andy Lee
Interesting. I should mention I hadn't turned on sandboxing in this project. When I turn it on, and I set the "User Selected File" entitlement to "Read Only", I get the same behavior as before: TextEdit.app is selected in the panel's column view, and it's treated like a regular (non-bundle)

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Charles Srstka
> On Jun 24, 2016, at 7:47 PM, Quincey Morris > wrote: > > On Jun 24, 2016, at 16:24 , Charles Srstka wrote: >> >> How could this be a security threat, when a malicious program could just set >> canChooseDirectories to true, open

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Quincey Morris
On Jun 24, 2016, at 16:24 , Charles Srstka wrote: > > How could this be a security threat, when a malicious program could just set > canChooseDirectories to true, open the panel to the app’s parent directory, > and spearphish the user into clicking OK on that? (I

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Charles Srstka
> On Jun 24, 2016, at 6:24 PM, Charles Srstka wrote: > > Making it not work with app bundles doesn’t seem to introduce any loopholes > that aren’t there already. *Making it work ___ Cocoa-dev mailing list

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Charles Srstka
> On Jun 24, 2016, at 3:54 PM, Quincey Morris > wrote: > > 1. [Security] Being able to select an arbitrary file programmatically might > lead to spearphishing exploits, where the user is tricked into opening a file > that is otherwise inaccessible from

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Martin Wierschin
>> It almost looks like the ability to pre-select a file was deliberately >> removed from the NSOpenPanel API. Whatever the reason for removing this feature from NSOpenPanel, it’s a nuisance for users. There are many good reasons for wanting to pre-select a particular file when presenting an

Re: How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Quincey Morris
On Jun 24, 2016, at 13:31 , Andy Lee wrote: > > It almost looks like the ability to pre-select a file was deliberately > removed from the NSOpenPanel API. Could that be the case? I don’t know, but I can think of three possible rational explanations: 1. [Security] Being able to

Re: NSService (aka. Bonjour) outside local network

2016-06-24 Thread Kyle Sluder
On Fri, Jun 24, 2016, at 02:11 AM, Gerriet M. Denkmann wrote: > Is it possible to create an NSService (OS X 10.11.45) which is > discoverable (via NSServiceBrowser) outside of the local WiFi network? Only if your machine is configured for Wide-area Bonjour. Regular Bonjour is restricted to the

How to pre-select a file in NSOpenPanel -- specifically, a .app bundle?

2016-06-24 Thread Andy Lee
How do I present an NSOpenPanel with a particular file pre-selected? I can pre-select a *directory* by setting openPanel.directoryURL. Since the file I want to select is actually a .app bundle, which is really a directory, you might think I'm in luck, but not quite. Here's the code I tried:

Re: NSArrayController - error inserting object at arranged object index N

2016-06-24 Thread Quincey Morris
On Jun 24, 2016, at 03:12 , Jonathan Mitchell wrote: > > The downside would be having to implement the compliant accessor methods in > the real model object (in my case the array is a constructed property of an > NSViewController subclass which obtains its array data from

Re: NSArrayController - error inserting object at arranged object index N

2016-06-24 Thread Jonathan Mitchell
> On 23 Jun 2016, at 23:03, Quincey Morris > wrote: > > On Jun 23, 2016, at 13:39 , Jonathan Mitchell > wrote: >> >> Do you mean something like this? >> NSMutableArray *proxy = [NSArrayController >>

NSService (aka. Bonjour) outside local network

2016-06-24 Thread Gerriet M. Denkmann
Is it possible to create an NSService (OS X 10.11.45) which is discoverable (via NSServiceBrowser) outside of the local WiFi network? What should be used for domain in this case? If not: what is the use of domain ≠ “local.” , e.g. domain = “” ? Also: I noticed that includesPeerToPeer = YES makes