• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Almost! to the end
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Almost! to the end


  • Subject: Almost! to the end
  • From: John Love <email@hidden>
  • Date: Tue, 12 Jan 2010 10:33:38 -0500

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 (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: A password strength checker
  • Next by Date: Re: What's the right way to make the last (or only) table column fill the width of an NSTableView?
  • Previous by thread: appController class in InterfaceBuilder
  • Next by thread: Re: Almost! to the end
  • Index(es):
    • Date
    • Thread