Re: Crash in NSControl's sizeToFit

2010-02-01 Thread slasktrattena...@gmail.com
On Mon, Feb 1, 2010 at 5:28 PM, Joar Wingfors wrote: > You're not allowed to do *anything* on non-main threads unless the > documentation *explicitly* says that it's OK. You should approach this > subject with great caution and restraint. If you can't prove that something > is safe, assume that

Re: Crash in NSControl's sizeToFit

2010-02-01 Thread Kyle Sluder
On Mon, Feb 1, 2010 at 8:16 AM, slasktrattena...@gmail.com wrote: > Quick followup: is it safe to set the token field's object value from > the background thread, or do I need to do it on the main thread as > well? Or to put it in more general terms: are _all_ calls to AppKit > from a background t

Re: Crash in NSControl's sizeToFit

2010-02-01 Thread Joar Wingfors
You're not allowed to do *anything* on non-main threads unless the documentation *explicitly* says that it's OK. You should approach this subject with great caution and restraint. If you can't prove that something is safe, assume that it's not, and stay away from it. j o a r On 1 feb 2010, at

Re: Crash in NSControl's sizeToFit

2010-02-01 Thread slasktrattena...@gmail.com
Quick followup: is it safe to set the token field's object value from the background thread, or do I need to do it on the main thread as well? Or to put it in more general terms: are _all_ calls to AppKit from a background thread disallowed, or only those regarding updating the UI? Also, is it thr

Re: Crash in NSControl's sizeToFit

2010-02-01 Thread slasktrattena...@gmail.com
On Mon, Feb 1, 2010 at 6:55 AM, Jens Alfke wrote: > > On Jan 31, 2010, at 7:39 AM, slasktrattena...@gmail.com wrote: > >> This looks like a bug in AppKit but I'm not sure. Any ideas? (I cannot >> reproduce the problem.) > > No, it's a bug in 'myProject' — it's calling AppKit from a background thre

Re: Crash in NSControl's sizeToFit

2010-01-31 Thread Jens Alfke
On Jan 31, 2010, at 7:39 AM, slasktrattena...@gmail.com wrote: > This looks like a bug in AppKit but I'm not sure. Any ideas? (I cannot > reproduce the problem.) No, it's a bug in 'myProject' — it's calling AppKit from a background thread, which is generally not allowed: 13 AppKit

Crash in NSControl's sizeToFit

2010-01-31 Thread slasktrattena...@gmail.com
This looks like a bug in AppKit but I'm not sure. Any ideas? (I cannot reproduce the problem.) Thanks. 2010-01-23 17:34:40 +: *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection was mutated while being enumerated.{type = mutable dict, count = 4, entries