• 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: Mantaining legacy APIs in a framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mantaining legacy APIs in a framework


  • Subject: Re: Mantaining legacy APIs in a framework
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 31 Aug 2015 16:24:34 -0700

> On Aug 31, 2015, at 4:09 PM, Graham Cox <email@hidden> wrote:
>
> So the framework needs to arrange that if -foo:withBar: wasn’t overridden, but -foo: was, it should invoke the older override for backward compatibility until the client code is revised.

One way to do it is something like
	@implementation BaseClass
	...
	if ([self methodForSelector: @selector(foo:)] != [BaseClass instanceMethodForSelector: @selector(foo:)]) {
		// self must be an instance of a subclass that’s overridden -foo:.
	}

—Jens
_______________________________________________

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


References: 
 >Mantaining legacy APIs in a framework (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Autolayout requiring NSDisableScreenUpdates
  • Next by Date: How to terminate an NSTask whenever my app terminates?
  • Previous by thread: Mantaining legacy APIs in a framework
  • Next by thread: How to terminate an NSTask whenever my app terminates?
  • Index(es):
    • Date
    • Thread