Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 12-09-2011, 04:47 PM   #1 (permalink)
Registered Member
 
Join Date: Apr 2011
Location: California
Posts: 225
KarlJay is on a distinguished road
Default CCMenuItem itemForTouch:touch method not found

I'm working thru the Cocos2d tutorial here:
How To Create Buttons in Cocos2D: Simple, Radio, and Toggle | Ray Wenderlich

and
Code:
-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
 
    if ( state_ != kCCMenuStateWaiting ) return NO;
    
    CCMenuItem *curSelection = [self itemForTouch:touch];
returns an error, 'method -itemForTouch not found

It looks like this was made for an older SDK, anyone have this problem or a work-around?


Is itemForTouch a part of Apples SDK or Cocos2d API?

Thanks.
KarlJay is offline   Reply With Quote
Old 12-10-2011, 06:11 PM   #2 (permalink)
Registered Member
 
Join Date: Apr 2011
Location: California
Posts: 225
KarlJay is on a distinguished road
Default

Update: I didn't find the answer to this problem, but it looks like most of the sample code / blogs out there are out dated.

Started a new tutorial and having no problems now. Seems the documentation for cocos2d is a bit hit and miss.
KarlJay is offline   Reply With Quote
Old 02-13-2012, 08:18 PM   #3 (permalink)
Registered Member
 
Imagine09's Avatar
 
Join Date: Aug 2008
Posts: 121
Imagine09 is on a distinguished road
Default

Quote:
Originally Posted by KarlJay View Post
I'm working thru the Cocos2d tutorial here:
How To Create Buttons in Cocos2D: Simple, Radio, and Toggle | Ray Wenderlich

and
Code:
-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
 
    if ( state_ != kCCMenuStateWaiting ) return NO;
    
    CCMenuItem *curSelection = [self itemForTouch:touch];
returns an error, 'method -itemForTouch not found

It looks like this was made for an older SDK, anyone have this problem or a work-around?


Is itemForTouch a part of Apples SDK or Cocos2d API?

Thanks.

Hi KarlJay,

Did you ever solve this? It's been driving me nuts...

Thanks
Imagine09 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 377
9 members and 368 guests
apatsufas, comicool, Creativ, Dalia, dansparrow, LunarMoon, mer10, Murphy, pbart
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,127
Posts: 402,916
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0