Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Lee Ann Rucker
> On Dec 21, 2015, at 2:26 PM, Quincey Morris > wrote: > > On Dec 21, 2015, at 14:16 , Jonathan Mitchell wrote: >> >> Is there anything I need to be aware of here? > > Try using ‘URLsForDirectory:inDomains:' instead. Ditto.

Any way to intercept the URL-opening mechanism on OS X?

2015-12-22 Thread Rick Mann
You know how you can click links in email, and heck, to open them in Safari (or whatever browser)? Is there any way to write an extension of some sort that can intercept this and re-write the URL? I tried to write a filter in Safari proper for the URL that the user pastes into the address bar,

Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Jonathan Mitchell
> On 21 Dec 2015, at 22:24, Sean McBride wrote: > > On Mon, 21 Dec 2015 22:16:39 +, Jonathan Mitchell said: > >> My app seems to be having trouble reading and writing to the >> applicationSupportDirectory. > > What's "trouble"? What error code do you get trying

Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Roland King
> On 22 Dec 2015, at 20:11, Jonathan Mitchell wrote: > > >> On 21 Dec 2015, at 22:24, Sean McBride wrote: >> >> On Mon, 21 Dec 2015 22:16:39 +, Jonathan Mitchell said: >> >>> My app seems to be having trouble reading and writing to the

Re: Return from a background queue

2015-12-22 Thread Roland King
You can’t do what you’re trying to do. First off, a block (which is what dispatch_async() takes) is defined to take no parameters and return nothing. That’s the source of your compilation error, you’re trying to return something from a block defined not to return anything. Secondly, what

Return from a background queue

2015-12-22 Thread Eric E. Dolecki
I am trying to return a dictionary from a method that uses a queue. I'm not sure how to actually return though as I get an error (can't convert value of type '() -> Dictionary' to expected argument type 'dispatch_block_t'. I've tried a number of things but none prevent an error

Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Jonathan Mitchell
> On 22 Dec 2015, at 12:21, Roland King wrote: > > >> On 22 Dec 2015, at 20:11, Jonathan Mitchell wrote: >> >> >>> On 21 Dec 2015, at 22:24, Sean McBride wrote: >>> >>> On Mon, 21 Dec 2015 22:16:39 +, Jonathan Mitchell

Re: Return from a background queue

2015-12-22 Thread Glenn L. Austin
The problem is that you need to return SOMETHING from getForecast -- right now you're returning nothing. The task will execute at some point "in the future" after the routine ends. An "easy" solution is to pass a closure to getForecast that will take a Dictionary? as a parameter (just in