Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region

2013-09-05 Thread Jonathan Taylor
Can anybody help me diagnose an error that I see intermittently? The errors are as follows: Thu Sep 5 10:11:11 Jonathan-Taylors-Mac-Pro.local Spim GUI[34152] : kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region Thu Sep 5 10:11:11 Jonathan-Taylors-Mac-Pro.local Spim GUI[34152] :

Re: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region

2013-09-05 Thread Graham Cox
On 05/09/2013, at 12:21 PM, Jonathan Taylor wrote: > Searching for those terms finds suggestions that this may be associated with > updating progress bars from a secondary thread. I still see the error even > after removing the only progress bar from my program; I don't know whether > the ca

Re: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region

2013-09-05 Thread Jonathan Taylor
> You can't do any UI-related updates from a secondary thread, you must ask the > main thread to do it. > > It might not be progress bars but anything at all that's being drawn from a > secondary thread. The error itself could indicate that an internal data > structure was used or updated by an

Re: Threadsafe copy of objective c object

2013-09-05 Thread Jonathan Taylor
On 4 Sep 2013, at 16:46, Marcel Weiher wrote: >>> Unless there is some dire reason not to do this, I would make a copy on the >>> main thread every time the UI changes, and stash that copy somewhere the >>> worker thread can access it easily. >> >> That's a really good plan, I realised that last

Re: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region

2013-09-05 Thread Graham Cox
On 05/09/2013, at 12:37 PM, Jonathan Taylor wrote: > Yes, I understand that. I am not aware of doing any drawing from secondary > threads, although evidently it appears that somewhere in the program this is > happening. My question is whether I can do anything to help track down the > proble

Re: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region

2013-09-05 Thread Jonathan Taylor
> Do you have any secondary threads? I assume you do. Indeed! > Any code that touches a view, no matter how indirectly, could be the culprit. > Bear in mind that sending any message to any view (controls, etc) might > invoke -setNeedsDisplay: which in turn could be the trigger for the problem.

Re: NSTimezone and offset

2013-09-05 Thread Lorenzo Thurman
Thank you for clearing that up. I have it now. On Sep 4, 2013, at 11:49 PM, dangerwillrobinsondan...@gmail.com wrote: > You are confusing the method with secondsFromGMT > > CDT is 3600 seconds is one hour ahead of CST and the docs could be more clear > about this method being self referential r

UITextField access from outside the main thread

2013-09-05 Thread Aaron Montgomery
Hi, I'm currently running into this issue trying to use Telerik Test Studio (and am asking about it there as well), but I think the issue is more general and would like some ideas. The situation: Test Studio drives my app's user interface from a background thread. In some places where the Test

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Kyle Sluder
On Thu, Sep 5, 2013, at 11:27 AM, Graham Cox wrote: > What can I do here to workaround this? Is this even necessary? The save panel's values should be correct at time of dismissal. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Graham Cox
On 05/09/2013, at 8:31 PM, Kyle Sluder wrote: > Is this even necessary? The save panel's values should be correct at > time of dismissal. But fields in my accessory view might not be. That's the problem I'm trying to solve - I've entered a value in a text field but have done nothing to 'commi

NSSavePanel problem with sandboxing

2013-09-05 Thread Graham Cox
I'm using NSSavePanel in a sandboxed app. The panel includes a custom accessory view, which works fine. I run the panel using -[NSSavePanel beginSheetModalForWindow:completionHandler:]; In the completion handler, I call [savePanel makeFirstResponder:savePanel] so that any text fields left in a

Re: UITextField access from outside the main thread

2013-09-05 Thread Kyle Sluder
On Sep 5, 2013, at 9:23 AM, Aaron Montgomery wrote: > > which is now looking like an awful lot of work just to read a data value and > adding a lot of extra code just to accommodate Test Studio. Right. The solution seems to be to ditch a development app that apparently doesn't even bother to

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Fritz Anderson
On 5 Sep 2013, at 1:27 PM, Graham Cox wrote: > I'm using NSSavePanel in a sandboxed app. The panel includes a custom > accessory view, which works fine. > > I run the panel using -[NSSavePanel > beginSheetModalForWindow:completionHandler:]; > > In the completion handler, I call [savePanel mak

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Kyle Sluder
On Thu, Sep 5, 2013, at 11:33 AM, Graham Cox wrote: > > On 05/09/2013, at 8:31 PM, Kyle Sluder wrote: > > > Is this even necessary? The save panel's values should be correct at > > time of dismissal. > > > But fields in my accessory view might not be. That's the problem I'm > trying to solve -

Re: Threadsafe copy of objective c object

2013-09-05 Thread Marcel Weiher
On Sep 3, 2013, at 12:52 , Jonathan Taylor wrote: > I have an objective c object which contains a number of properties that serve > as parameters for an algorithm. They are bound to UI elements. I would like > to take a snapshot copy of the object that will be used for one whole run of > the

Re: Auto layout semantics?

2013-09-05 Thread Marcel Weiher
[this seems to have bounced earlier] Hi Kyle, Izak, On Aug 16, 2013, at 19:18 , Kyle Sluder wrote: > As Ken Ferry described in his Auto Layout session at WWDC 2011, the specific > solver used by Apple is based on the Cassowary constraint engine. Yes, the algorithm involved is a variant of the

Re: NSSavePanel problem with sandboxing

2013-09-05 Thread Graham Cox
On 05/09/2013, at 8:54 PM, Kyle Sluder wrote: > What happens if you ask one of your accessory controls for its -window > and ask _that_ object to -makeFirstResponder:? That window should be in > your own process. Works on 10.8, but in fact the control's window is the same object as the save p