• 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: respondsToSelector works in app project, not in library?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: respondsToSelector works in app project, not in library?


  • Subject: Re: respondsToSelector works in app project, not in library?
  • From: Jesper Storm Bache <email@hidden>
  • Date: Mon, 12 Jan 2009 14:05:53 -0800

First make sure that you are calling the method that you think you are.
In your library version, maybe some other code replaces your method implementation (potentially though a category), or some code overrides your action.
A have had a fair amount of success with stepping into disassembly and then out on the "other side" of the method invocation.


Jesper Storm Bache


On Jan 12, 2009, at 12:08 PM, Alex Kac wrote:

We have a piece of code that we have in the main source of a project
as well as a static library in another project.

		SEL action = NSSelectorFromString(aServiceName);
		if ([self respondsToSelector:action])
		{
			[self performSelector:action];
		}


In the project where the above code is part of the main project - it works great. In the static library it does nothing. To be clear - respondsToSelector: returns true. So why would respondsToSelector return true, but performSelector do nothing? ALso I get no error of any kind in the console.

Alex Kac - President and Founder
Web Information Solutions, Inc.

"In the Country of the Blind, the one-eyed man is king."
--Desiderius Erasmus





_______________________________________________

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

_______________________________________________

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: 
 >respondsToSelector works in app project, not in library? (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: changeKeyPath method documentation
  • Next by Date: Re: @loader_path and @executable_path
  • Previous by thread: respondsToSelector works in app project, not in library?
  • Next by thread: Xcode-like "Groups & Files" view: NSTreeController and/or core data?
  • Index(es):
    • Date
    • Thread