I want to create a selector from a class method.
I do like this:
NavigationTreeActionHandler* handler=[NavigationTreeActionHandler self];
NavigationTreeNode* bombsNode=new NavigationTreeNode("Bombs","bigbomb.tif"
,handler,@selector(BigBombButtonPressed:));
I need to pass the target and selector to the target method in the NavigationTreeNode. I am trying to get the target using the self property of a class object (I don't know if htis is the right way to do this). Then I get a selector for the class method that I want to call in the class.
Everything compiles fine, but when using:
[[handler class] instanceMethodSignatureForSelector:selector];
I get zero and don't know why ... can anyone help?
source
share