Re: NSTask is intermittently failing to return results.

2011-03-18 Thread Jason Harris
> > Hi Jason > > I haven't attempted to debug your code but I use NSTask extensively and have > experienced some of the problems you describe. > > In each case I was not correctly handling the asynchronous availability of > data in the pipe ie: there is nothing wrong with the approach but > i

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread Jason Harris
On Mar 18, 2011, at 10:36 PM, jonat...@mugginsoft.com wrote: > > On 18 Mar 2011, at 21:04, Jason Harris wrote: >> >> >> Hi Jonathan, >> >> Thanks for looking at this! It's good to know I am not going crazy and there >> is some subtle thing I am

Re: NSTask is intermittently failing to return results.

2011-03-18 Thread Jason Harris
hen things were working it was uncommon or I didn't get the NSTaskDidTerminateNotification first.... It was just a data point I was trying to give everyone so it might shed some light on the problem. > On Mar 17, 2011, at 4:01 AM, Jason Harris wrote: > >> - (BOOL) waitTillFini

Re: NSTask is intermittently failing to return results.

2011-03-19 Thread Jason Harris
On Mar 19, 2011, at 1:27 PM, Ken Thomases wrote: > On Mar 18, 2011, at 5:32 PM, Jason Harris wrote: > >> On Mar 18, 2011, at 11:07 PM, Ken Thomases wrote: >> >>> The exception is saying that the file descriptor backing the >>> NSPipe/NSFileHandle has been c

Re: NSTask is intermittently failing to return results.

2011-03-19 Thread Jason Harris
Sorry I have to break this into several replies to get around the automatic size limits of post to this group. So here is the reply in a couple of bites: On Mar 19, 2011, at 8:43 PM, Bill Monk wrote: >> I have looked at (in fact studied in detail) the source code for Moriarity, >> AMShellWrappe

Re: NSTask is intermittently failing to return results.

2011-03-19 Thread Jason Harris
Answer part II On Mar 19, 2011, at 8:43 PM, Bill Monk wrote: > Please, you must stop now, you're going to make yourself nuts. :) > > - (void) gotError:(NSNotification*)notification > { > > (@"...got NULL Error Output for %@ ...", [self commandLineString]); > errHandle_ = nil; >

Re: NSTask is intermittently failing to return results.

2011-03-19 Thread Jason Harris
Answer part III On Mar 19, 2011, at 8:43 PM, Bill Monk wrote: > * Except, when it finally does call finishUp (if it ever does; here it seems > to get into an infinite loop), it's just too complicated. All you do here is > unregister observers, read any remaining data, and dispose of file handle

GCD dispatch workers and termination

2011-03-27 Thread Jason Harris
Hi All, Following on from some of the issues I had and people raised about NSTasks intermittently failing I now have the following issue. When I profile my application (MacHg) in threads, I can see a large number of DispatchWrokers which are created but never seem to exit. In an effort to track

Re: GCD dispatch workers and termination

2011-03-27 Thread Jason Harris
On Mar 27, 2011, at 10:56 PM, Kyle Sluder wrote: > On Sun, Mar 27, 2011 at 11:27 AM, Jason Harris wrote: >> Can anyone shed some light on why these DispatchWorkers are not terminating? > > Are they doing any work? If not, why does it matter? GCD might be > keeping them ar

Re: GCD dispatch workers and termination

2011-03-27 Thread Jason Harris
On Mar 27, 2011, at 11:14 PM, Ken Thomases wrote: > On Mar 27, 2011, at 1:27 PM, Jason Harris wrote: > >> - (void) doWorkerLaunches >> { >> for (int i = 1; i <50; i++) >> { >> dispatch_async(dispatch_get_global_queue(0,0), ^{ >>

Re: GCD dispatch workers and termination

2011-03-27 Thread Jason Harris
> Possibly unrelated to your issue with the dispatch threads (although possibly > related), the above use of NSTask is somewhat broken. You've made a common > mistake. It is not OK to block waiting for the task to exit when you haven't > established an ongoing asynchronous read of its output (

Re: GCD dispatch workers and termination

2011-03-27 Thread Jason Harris
> Possibly unrelated to your issue with the dispatch threads (although possibly > related), the above use of NSTask is somewhat broken. You've made a common > mistake. It is not OK to block waiting for the task to exit when you haven't > established an ongoing asynchronous read of its output (

Automatic graphics switching...

2011-03-29 Thread Jason Harris
Hi All, Some users are complaining that my application (MacHg) is causing their MacBooks to switch from using the integrated Intel (lower power) card to the NVIDIA (higher power) graphics card. Eg some related articles I dug up: http://appletoolbox.com/2010/05/macbook-pro-mid-2010-graphics-swi

Re: Automatic graphics switching...

2011-03-29 Thread Jason Harris
On Mar 29, 2011, at 11:36 PM, Nick Zitzmann wrote: > > On Mar 29, 2011, at 3:16 PM, Jason Harris wrote: > >> Hi All, >> >> Some users are complaining that my application (MacHg) is causing their >> MacBooks to switch from using the integrated Intel (lo

An "Open With..." submenu...

2011-04-02 Thread Jason Harris
Hi All, Two related questions. (1) Managing the default application for documents from a "file manager" type of appication. (2) An "Open With..." menu. --- (1) (Background: MacHg is a "browser" or "file manager" type of application (its a GUI for the DVCS mercurial) so its role is to

Re: Mac App Store requirements

2011-04-10 Thread Jason Harris
Is it about as easy / difficult as adding say Sparkle support to your app? Easier? More difficult? (I also don't know this and I have been planning to add MacHg to the MacApp store at some stage in the not too distant future...) Thanks! Jas On Apr 10, 2011, at 8:47 PM, Laurent Daudelin wrote:

Re: Lockless thread-safe accessor using blocks: how to?

2011-04-14 Thread Jason Harris
On Apr 14, 2011, at 7:44 PM, David Duncan wrote: > On Apr 14, 2011, at 10:26 AM, WT wrote: > >> On Apr 14, 2011, at 2:09 PM, David Duncan wrote: >> >>> On Apr 14, 2011, at 10:02 AM, WT wrote: >>> I looked at dispatch_once() at one point, but I'm still confused by how it works. >>>

libraries for flashing a message

2011-05-01 Thread Jason Harris
Hi All, Before I roll my own, I am wondering if there are any libraries around which can briefly display a nice notification bubble over a window. It would be displayed and then after say time period eg 3 seconds taken down... Any user initiated action that targets the responder chain for the w

Wolfram Research is seeking iOS / Cocoa / Mac developers

2013-06-24 Thread Jason Harris
Hi All, Wolfram research is looking for 2 or 3 full time Cocoa / iOS / Mac developers, preferably with C++ experience. You will be able to work remotely. If you are interested please see: http://www.wolfram.com/company/careers/user-interface-developers.html Yours, Jason Harris Senior