• 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
Re: Uniform Type Identifiers (UTIs)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uniform Type Identifiers (UTIs)


  • Subject: Re: Uniform Type Identifiers (UTIs)
  • From: Steve Christensen <email@hidden>
  • Date: Wed, 4 Jan 2006 12:53:22 -0800

On Jan 4, 2006, at 8:33 AM, Philip Dow wrote:

On Jan 4, 2006, at 12:01 AM, Shawn Erickson wrote:

On Jan 3, 2006, at 2:44 PM, Philip Dow wrote:

Thanks Shawn and Steve. I thought it might have to do with the web archive uti if not the uti constants in general. I'm already weak linking my app and checking for 10.4 before calling other methods

In general you shouldn't need to check for 10.4 just if the symbol you want to use exists (non-null).

I'm using 10.4 features all over the app within a variety of objects while continuing compatibility with 10.3.9. To accomplish this, rather than check for the existence of a 10.4 specific symbol whenever I need it, I check NSAppKitVersionNumber as my main controller inits and then set a user default bool depending on the value. Once I've done that, the bool value is available from anywhere with minimal hassle.

You're having to do a runtime check in either case so having a special boolean doesn't really buy you anything. With a boolean (or even saving the value returned by NSAppKitVersionNumber), you have to keep track of the first OS version where a symbol becomes available; checking for the existence of a particular symbol lets you automatically handle the case where, say, a symbol becomes available in 10.4.3 but wasn't available in 10.4.


Also, wrapping these specifics in a few class methods or routines means that the OS version details are also limited to a few specific places, rather than scattered all over your code. Bug fixes happen in the one instance of a wrapper and are automatically available to all callers.

steve

_______________________________________________
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


References: 
 >Uniform Type Identifiers (UTIs) (From: Philip Dow <email@hidden>)
 >Re: Uniform Type Identifiers (UTIs) (From: Steve Christensen <email@hidden>)
 >Re: Uniform Type Identifiers (UTIs) (From: Philip Dow <email@hidden>)
 >Re: Uniform Type Identifiers (UTIs) (From: Shawn Erickson <email@hidden>)
 >Re: Uniform Type Identifiers (UTIs) (From: Philip Dow <email@hidden>)

  • Prev by Date: Re: MainMenu
  • Next by Date: Re: Custom Objects in an NSTextView
  • Previous by thread: Re: Uniform Type Identifiers (UTIs)
  • Next by thread: Re: Uniform Type Identifiers (UTIs)
  • Index(es):
    • Date
    • Thread