My question is about the situation where things are fine for a method with a parameter, but for two No. The code comes from Apple Animation Sample Code.
The main visual object, (self), is the reference reference only to an abstract superclass object, s.
This is an instance obtained from such a superlace:
[self.s myMethod: param1]; And it works fine.
However, when I try:
[self.s anothermethod: param1 secondParam: param2]; I get a compilation error:
semantic digits> Example method 'Onsmuth: Seconds:' Not found (Return type defaults for 'ID')
The type of return in both methods is - (zero).
Any suggestion would be appreciated.
(I really do not want to resort to adding standards to an object!)
Revision with the example below
These types of announcements include superclass files and inherited classes
class for super:
@interface superclass: NSObject {...} ... - (zero Mymethod: (SomeObject *) param1; - (zero) another method: (some object *) param1: (int) param2; @end For an Inherited Class:
#import "SuperClass.h" @ Interface Inherited Class: Super Class {...} ... - (zero) myMethod: (SomeObject *) param1; - (zero) another method: (some object *) param1: (int) param2; Implementation in each file's M file
has tried to add it to the inherited class .m file.
@ interface inherited class () - (zero) another method: (some objects *) param 1: (int) absolute 2; @end
This call:
[self . Another method: the ultimate 1 second paramaram: the ultimate 2]; ... means method name another method: second paragraph: . This announcement:
- (zero) another method: (some object *) param1: (int) param2; ... does not have the same name.
Is it possible that you say:
- (zero) another method: (some object *) param1 secondParam: (int) param2; ?
Comments
Post a Comment