multiple methods named '-position' found

Shingo Satou akio0911 at gmail.com
Sat Apr 12 01:48:07 PDT 2008


Hi Guys,

I wrote the following programs.

-(void)changeSelectedIndex:(NSInteger)theSelectedIndex
{
	selectedIndex=theSelectedIndex;
	
	if (selectedIndex == [names count]) selectedIndex=[names count]-1;
	if (selectedIndex < 0) selectedIndex=0;

	selectionLayer.position = [[[menusLayer sublayers]
		objectAtIndex:selectedIndex] position];
};

When I Bild it, the following errors are output.

/Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning:
multiple methods named '-position' found
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191:
warning: using '-(NSInsertionPosition)position'
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:598:
warning: also found '-(CGPoint)position'
/Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error:
incompatible type for argument 1 of 'setPosition:'
	/Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning:
multiple methods named '-position' found
	/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191:
warning: using '-(NSInsertionPosition)position'
	/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:598:
warning: also found '-(CGPoint)position'
	/Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error:
incompatible type for argument 1 of 'setPosition:'

I appreciate any help.


akio


More information about the MacOSX-dev mailing list