• 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
Deprecated APIs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deprecated APIs


  • Subject: Deprecated APIs
  • From: charisse napeÿfffff1as <email@hidden>
  • Date: Tue, 23 Feb 2010 02:09:33 -0800 (PST)

Hello,

I am not sure if this problem has already been submitted but how do I define two APIs, one that is supported from Leopard down and
another that is only supported in Snow Leopard if I only have one binary for all OSes?

Below is a snippet of my code

// below should be performed if the OS is Snow Leopard
[panel setDirectoryURL: @"/Users/whatever/Pictures/"];
[panel setNameFieldStringValue:@"Untitled"];
[panel beginSheetModalForWindow:mWindow
                          completionHandler:^(NSInteger returnCode) {
                          [panel orderOut:self];
                          [self didEndPathSelectorSheet: returnCode
                                                             filename: [ [panel URL] relativePath] ];
                          } ];




// Otherwise below should be performed
[panel beginSheetForDirectory: @"/Users/whatever/Pictures/"
                                             file: @"Untitled"
                       modalForWindow: mWindow
                          modalDelegate: self
                          didEndSelector: @selector(sheedDidEnd:returnCode:contextInfo:)
                                contextInfo: nil];

I tried using the #if conditionals e.g. #if MAC_OS_X_VERSION_MAX_ALLOWED ......
but my application crashes. It will successfully build on compile time but crashes during runtime


      New Email names for you!
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/
_______________________________________________

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

  • Follow-Ups:
    • Re: Deprecated APIs
      • From: Steve Christensen <email@hidden>
    • Re: Deprecated APIs
      • From: Andreas Mayer <email@hidden>
    • Re: Deprecated APIs
      • From: "Paul Sanders" <email@hidden>
  • Prev by Date: Re: Core Data: Custom to-many relationship setter not being invoked
  • Next by Date: Re: Deprecated APIs
  • Previous by thread: Re: progressbar animation not working on snow leopard
  • Next by thread: Re: Deprecated APIs
  • Index(es):
    • Date
    • Thread