Thanks to many, many folk, I am at the very end of my project .. calculating an 
Excel spreadsheet, cell by cell .. with the calculations done in a background 
thread .. using either +detachNewThreadSelector and/or NSPorts with 
NSPortMessages, or even a NSOperationQueue.  Tried all 3 approaches just for 
the sake of learning, and they all work.

It's definitely been quite an education for me and quite an exercise in 
patience for all you folks.

Oh, one more thing .. I use HAS's appscript application, ASTranslate, to 
convert my previous! AppleScript Studio code to Cocoa .. and it really works.

After completing each row's worth of calculations, I test for the existence of 
both Excel and the spreadsheet .. in case the user prematurely quits the app or 
closes the spreadsheet .. and it works like a charm .. if quitting or closing, 
a message appears in my doc window.

EXCEPT, if the user quits the app or closes the spreadsheet in the middle of 
completing the calculations for each row before I have a chance to do the 
appropriate testing.  Even if I burden my code by testing before each cell in 
the entire row, I still (theoretically) could encounter a quit or a close in 
the middle of a cell's calculation.  Clearly, getting or setting the value in a 
cell of a spreadsheet doc that is closed crashes my app.

My very initial thoughts focus on NSError, except HAS's ASTranslate app does 
not seem to include a built in NSError object, such as is passed to 
NSDocument's -readFromURL.

Any help out there for this worst-case scenario?  Thanks in advance.

John Love
Touch the Future! Teach!

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to