Re: Interface Builder button appearance

2013-02-04 Thread Boyd Collier
Andy, Many thanks! I can't imagine how that middle cell got corrupted but I suppose I did something foolish months ago. I have BBEdit, so I'll make the appropriate change. Thanks again, Boyd On Feb 4, 2013, at 1:12 PM, Andy Lee wrote: > As near as I can tell, the nib has gotten corrupted s

Re: NSOperation communicating progress?

2013-02-04 Thread Todd Heberlein
On Feb 4, 2013, at 3:16 PM, Graham Cox wrote: > You have heard of performSelectorOnMainThread? Might simplify your code > substantially. I was following Apple's "Concurrency Programming Guide", and I don't think it is in there. I've gone back and used it now to call the clean-up code. On Fe

Re: NSOperation communicating progress?

2013-02-04 Thread Graham Cox
On 05/02/2013, at 9:35 AM, Todd Heberlein wrote: > moved the code to another method, -finishedReadingAuditFile, and then > created another NSInvocationOperation to call it on the main thread Wow. You have heard of performSelectorOnMainThread? Might simplify your code substantially. --Gra

Re: NSOperation communicating progress?

2013-02-04 Thread Mike Abdullah
On 4 Feb 2013, at 22:35, Todd Heberlein wrote: > >> Again, everything seems to work fine. The one problem is I get the following >> warning at the very end: >> >> CoreAnimation: warning, deleted thread with uncommitted CATransaction; >> set CA_DEBUG_TRANSACTIONS=1 in environment to log

Re: NSOperation communicating progress?

2013-02-04 Thread Todd Heberlein
> Again, everything seems to work fine. The one problem is I get the following > warning at the very end: > > CoreAnimation: warning, deleted thread with uncommitted CATransaction; > set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. To close out this discussion in case anyone

Re: KVO, which thread?

2013-02-04 Thread Mike Abdullah
On 4 Feb 2013, at 21:44, Todd Heberlein wrote: > I have an NSInvocationOperation, anOp, and register to observe when its > isFinished variable is set > > [anOp addObserver:self forKeyPath:@"isFinished" > options:NSKeyValueObservingOptionNew context:NULL]; > > When my operation is done, isFin

Re: KVO, which thread?

2013-02-04 Thread Todd Heberlein
On Feb 4, 2013, at 1:54 PM, Robert Monaghan wrote: > Set a breakpoint and see which thread it stops on. > > (It is probably not the main thread. But you will find out for certain with > the breakpoint.) Brilliantly simple! Thanks. And your hunch is correct. It was not thread #1 (it was #4 i

Re: KVO, which thread?

2013-02-04 Thread Robert Monaghan
Hi, Todd, Set a breakpoint and see which thread it stops on. (It is probably not the main thread. But you will find out for certain with the breakpoint.) Bob Sent from my iPhone On Feb 4, 2013, at 22:44, Todd Heberlein wrote: > I have an NSInvocationOperation, anOp, and register to observe

KVO, which thread?

2013-02-04 Thread Todd Heberlein
I have an NSInvocationOperation, anOp, and register to observe when its isFinished variable is set [anOp addObserver:self forKeyPath:@"isFinished" options:NSKeyValueObservingOptionNew context:NULL]; When my operation is done, isFinished is set, and thus my method -observeValueForKeyPath:ofObje

Re: Binding NSMenu to NSArray

2013-02-04 Thread Keary Suska
On Feb 4, 2013, at 11:15 AM, Geoffrey Holden wrote: > In the same way that it is possible to bind NSTableView to an NSDictionary, > is it possible to bind NSMenu to an NSArray? I have an array of > dictionaries. The dictionaries contain the menu name, and may contain a > further array of diction

Re: Interface Builder button appearance

2013-02-04 Thread Andy Lee
As near as I can tell, the nib has gotten corrupted somehow, or perhaps there is some setting that you were previously able to set in IB that is no longer exposed, or is really non-obvious. To fix, you can simply recreate that cell in the matrix or, if you're not squeamish about manually editin

Re: new to Cocoa/Objective-c: many points of confusion

2013-02-04 Thread Lee Ann Rucker
On Jan 21, 2013, at 10:10 PM, Alex Hall wrote: > Hello all, > > > *Outlets: I have a basic idea that these are a way of sending messages from > object to object, a bit like listeners. However, I don't really understand > the syntax used to make them. Moreover, I always see them used in GUIs,

Re: iOS 6.0 SDK UIApplicationInvalidInterfaceOrientation

2013-02-04 Thread Mazzaroth M.
Docs: UIInterfaceOrientationMaskLandscape The view controller supports both landscape-left and landscape-right interface orientation. Appears to be what I want.. Do you mean in the -supportedInterfaceOrientations or -preferredInterfaceOrientationForPresentation? Michael On Mon, Feb 4, 201

NSTask Explodes. Clueless.

2013-02-04 Thread Seth Willits
In my app I have to launch background processes (bundled within my app's Resources folder) to do some things, and I launch them with NSTask. Every now and then I get a crash report which shows NSTask throws some fatal exception which is not caught by a wrapping @try block. For example: @tr

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-02-04 Thread Gilles Celli
Thanks Kyle, I've setup my code to update the UI on the main thread, as recommended... but strangely enought the uncommitted CATransaction warning only happes on OS X 10.8.x and not on 10.7.x (XCode 4.6). Gilles On 4 févr. 2013, at 17:56, Kyle Sluder wrote: > On Mon, Feb 4, 2013, at 08:05 AM,

Binding NSMenu to NSArray

2013-02-04 Thread Geoffrey Holden
In the same way that it is possible to bind NSTableView to an NSDictionary, is it possible to bind NSMenu to an NSArray? I have an array of dictionaries. The dictionaries contain the menu name, and may contain a further array of dictionaries, to a potential level of eight deep. I'd like to be ab

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread Steve Sisak
At 3:58 PM +0800 2/4/13, õöâ¿ôb wrote: Thanks Mike seem You are right, and I write like this [self performSelector:@selector(doTheThing) withObject:nil afterDelay:0.5]; it can work correctly. And thanks for your suggestion I suspect that if you change > >//Case 3 hang up, HUD not s

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread Kyle Sluder
On Sun, Feb 3, 2013, at 11:58 PM, 尹佳冀 wrote: > Thanks Mike seem You are right, and I write like this > > [self performSelector:@selector(doTheThing) withObject:nil > afterDelay:0.5]; > it can work correctly. Magic constants like this are evil and are a serious indicator of poor programming practi

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-02-04 Thread Kyle Sluder
On Mon, Feb 4, 2013, at 08:05 AM, Gilles Celli wrote: > > I have some deleted threads though with "uncommitted CATransaction" on OS > X 10.8.2 only (but not on OS X 10.7.x) to display the graphs… > but that could be a bug of the graphs framework…need to check…. This usually happens because your b

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-02-04 Thread Gilles Celli
Mike, Again you were right ! The data processing was blocking the main queue with large files, so that the Open Panel didn't close immediately. It works now with large data files too by using dispatch_barrier_async() in the init file of my app's WindowController class. I have some deleted thr

Re: NSDocument packages and incremental writing using NSFileWrapper

2013-02-04 Thread Mike Abdullah
On 30 Jan 2013, at 15:53, Thomas Zoechling wrote: > Hello, > > My NSDocument based app uses packages with the following structure: > > - document.package > +- metadata.plist (small, mutable) > +- large0.file (large, immutable) > +- large1.file (large, immutable) > +- large2.file (large, immuta

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-04 Thread 尹佳冀
Thanks Mike seem You are right, and I write like this [self performSelector:@selector(doTheThing) withObject:nil afterDelay:0.5]; it can work correctly. And thanks for your suggestion 2013/2/3 Mike Abdullah > > On 3 Feb 2013, at 07:41, 尹佳冀 wrote: > > > Hi All > > > > Does anyone can know what