• 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
To @try or not?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

To @try or not?


  • Subject: To @try or not?
  • From: James Bucanek <email@hidden>
  • Date: Fri, 8 Oct 2004 00:04:00 -0700

Greetings,

I'm a fairly new Cocoa/Obj-C programmer.

I was just about to start writing @synchronized and @try/@catch blocks when I read this in the documentation:

Note: Using either of these features in a program, renders the application
runnable only in Mac OS X v10.3 and later because runtime support for exception
handling and synchronization is not present in earlier versions of the software.

I have it in the back of my mind that the program I'm writing should run under 10.2 as well. So, here are my questions:

(1) Are there alternative exception handling and thread synchronization techniques or libraries that will work in 10.2 and later? I saw a reference in the gcc 3.3 release notes to NSException and NS_DURING/NS_HANDLER. Are these the standard pre 10.3 exception constructs? Are there any significant advantages to using @try over NS_DURING?

(2) If I start writing code using @try/@catch and @synchronized, how difficult will it be to retrofit that code so it will work in 10.2?

Thanks,

James
--
James Bucanek <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: To @try or not?
      • From: Alex Perez <email@hidden>
  • Prev by Date: Re: Equivelent to drawRect: for drawing after sub views are drawn
  • Next by Date: Has anyone any experience with NSTableView and NSArrayController ?
  • Previous by thread: Re: multiple documents, single window
  • Next by thread: Re: To @try or not?
  • Index(es):
    • Date
    • Thread