Re: Sandboxing and calling Launchctl

2012-06-01 Thread Mark Allan
Thanks Alex, Thanks for your reply. If you're talking about the com.apple.security.inherit entitlement, that only works for helper apps which are launched via fork/exec from the main application. When the helper app is launched by LaunchServices (via SMLoginItemSetEnabled) it crashes immediat

Re: Sandboxing and calling Launchctl

2012-06-01 Thread Roland King
On Jun 1, 2012, at 4:33 PM, Mark Allan wrote: > Thanks Alex, > > Thanks for your reply. > > If you're talking about the com.apple.security.inherit entitlement, that only > works for helper apps which are launched via fork/exec from the main > application. When the helper app is launched by L

Re: NSXMLParser thread safe?

2012-06-01 Thread Nick Zitzmann
On May 31, 2012, at 11:36 PM, Graham Cox wrote: > I wonder if it's a stack space issue? I'm getting EXC_BAD_ACCESS with code 13 > - where are these codes listed? Is there a way to increase stack space for a > thread? That depends. How are you creating the thread? It isn't difficult to do using

iOS preferences outside the application bundle

2012-06-01 Thread Alex Zavatone
Hi. I've seen demos for writing app preferences within the app's bundle, but we have to deliver apps internally that have a unique assigned id on each device and changing the value, recompiling and placing the app on each device is far from ideal. What would be nice is that if I could save the

Re: NSXMLParser thread safe?

2012-06-01 Thread Graham Cox
On 02/06/2012, at 1:55 AM, Nick Zitzmann wrote: > That depends. How are you creating the thread? It isn't difficult to do using > either the pthread or NSThread APIs. Well, I started with the NSThread method that I've used classically, but moved it over to using NSInvocationOperations in a NS

Re: NSXMLParser thread safe?

2012-06-01 Thread Kyle Sluder
On Jun 1, 2012, at 4:18 PM, Graham Cox wrote: > > On 02/06/2012, at 1:55 AM, Nick Zitzmann wrote: > >> That depends. How are you creating the thread? It isn't difficult to do >> using either the pthread or NSThread APIs. > > > Well, I started with the NSThread method that I've used classical

Re: NSXMLParser thread safe?

2012-06-01 Thread Joar Wingfors
On 1 jun 2012, at 18:15, Kyle Sluder wrote: > That would make it unsafe to access the same NSXMLParser instance from two > different NSOperations. Not necessarily. It all depends on the context of where the operations are executing. Joar ___ Co

Re: NSXMLParser thread safe?

2012-06-01 Thread Graham Cox
On 02/06/2012, at 11:15 AM, Kyle Sluder wrote: > It's important to note that operation queues (and dispatch queues for that > matter) do not guarantee anything about what threads your operations execute > on. Apple's notoriously slippery definition of "thread-safe" can still bite > you if the

NSOperationQueue

2012-06-01 Thread Graham Cox
A question about NSOperationQueue: Is there a way to add operations to the queue so that they "jump the queue" ahead of any operations that are not running and have not been run yet? Here's my use case: I have a browser that browses folders full of SVG files. To create a thumbnail preview of t

Re: NSOperationQueue

2012-06-01 Thread Kyle Sluder
On Jun 1, 2012, at 8:07 PM, Graham Cox wrote: > A question about NSOperationQueue: > > Is there a way to add operations to the queue so that they "jump the queue" > ahead of any operations that are not running and have not been run yet? Give them a higher priority. You should be able to alter

Re: NSOperationQueue

2012-06-01 Thread Graham Cox
On 02/06/2012, at 1:12 PM, Kyle Sluder wrote: > Give them a higher priority. You should be able to alter the priorities as > the user scrolls, and NSOperationQueue will do the right thing. I tried this but it doesn't work - a bit of thought about how the ops are queued will show why no meanin

Re: NSOperationQueue

2012-06-01 Thread Kyle Sluder
On Jun 1, 2012, at 8:23 PM, Graham Cox wrote: > > On 02/06/2012, at 1:12 PM, Kyle Sluder wrote: > >> Give them a higher priority. You should be able to alter the priorities as >> the user scrolls, and NSOperationQueue will do the right thing. > > > I tried this but it doesn't work - a bit of

RE: NSOperationQueue

2012-06-01 Thread Julius Oklamcak
>> At the moment that the operations are queued, there are some operations in the queue not yet run, and some running. The code that creates the operations doesn't know which ones are needed more urgently (the latest ones), so it can only assign a high priority to all of them, so they all end up wi

Re: Sandboxing. WTF?

2012-06-01 Thread koko
On May 29, 2012, at 8:03 PM, Shawn Bakhtiar wrote: > The Master Control Program from Tron Could not agree with you more. Rather than abandon the App Store we are going to use it as a 'nose under the tent' … I cannot go into details but suffice it to say there are ways to use the ubiquity of t

Re: NSOperationQueue

2012-06-01 Thread Graham Cox
On 02/06/2012, at 2:36 PM, Julius Oklamcak wrote: > Potentially you could end up queuing up hundreds (or thousands) of thumbnail > generation requests (depending on how many SVG files the user has). If the > user was to close the browser to do something else, or switch to another > app, you would

adding space for 'annotations' with a typesetter subclass

2012-06-01 Thread Bill Dudney
Hello, I'm able to add additional space around a paragraph in my subclass of NSATSTypesetter's implementation of willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:. However, I am not getting what I expect as I tweak the parameters to this method. I was hoping for some insight on wh