Narendrabrsoft / cocos2d-android-1

Automatically exported from code.google.com/p/cocos2d-android-1
0 stars 0 forks source link

[problem] callback method never called for CCMenuItemImage.item(...) #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I use the last "jar" version.

I try to set up a Menu. However, when I create an item with the following 
method :

CCMenuItemImage.item("icon-lite.png", "icon-lite.png", 
"icon-lite.png",this,"pressedList");

the callback method (given as last parameter) is never called when I touch up 
the image.

Original issue reported on code.google.com by Ayorosm...@gmail.com on 21 Dec 2010 at 9:17

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi thankst for your quick answer.
Indeed, it works with the latest github's sources ;)

By the way, is there a forum concerning cocos2d-1 project ?
Or can we use the "issue" section to ask for problems ?

Original comment by Ayorosm...@gmail.com on 22 Dec 2010 at 3:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ok, nice !

Original comment by Ayorosm...@gmail.com on 22 Dec 2010 at 4:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Perfect, thanks ;)

Original comment by Ayorosm...@gmail.com on 24 Dec 2010 at 12:11

GoogleCodeExporter commented 8 years ago
Hi,
  I need to send parameter with the callback selector. I was searched a lot in the website but I could not get any idea. Can anyone help me with the sample code.

Thanks in advance.

Original comment by sgeeyo...@gmail.com on 4 Jan 2011 at 12:55

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi zhouweikuan,
             Thanks for your replay and sorry for the delay. I tried this but it showing a warning message like "java.lang.NoSuchMethodException:callback". I'm struggling in this area and the project getting delay because of this issue. Can I have some other option.

Thanks

Original comment by sgeeyo...@gmail.com on 5 Jan 2011 at 1:50

GoogleCodeExporter commented 8 years ago
Are you sure to have the latest github sources ?

Original comment by alexandr...@gmail.com on 5 Jan 2011 at 2:26

GoogleCodeExporter commented 8 years ago
Hi alexander.bour,
             My github version is 0.99.4(published date 10th-dec), this is what I got from the website. I don't know which is updated version. If the latest version is available please send me the link. 

Thanks for the reply.

Original comment by sgeeyo...@gmail.com on 5 Jan 2011 at 2:42

GoogleCodeExporter commented 8 years ago
I don't know when the bug was resolved but should download the last github 
version.

As for as i'm concerned i used in the constructor something like that : 

CCMenuItemImage myButton = CCMenuItemImage.item("imageOff.png", "imageOn.png", 
this, "callback");
CCMenu menu = CCMenu.menu(myButton);
this.addChild(menu);    

and the callback "fct" function looks like that :

public void fct(Object sender){
        //the callback here         
        }

If your problem persists, add a post in the forum (  
http://cocos2d.boombuler.de/index.php ), which is a more appropriate place to 
ask for questions.

Original comment by Ayorosm...@gmail.com on 5 Jan 2011 at 3:05

GoogleCodeExporter commented 8 years ago
Thank you for your reply Ayorosmage,i'll try this now.

Original comment by sgeeyo...@gmail.com on 5 Jan 2011 at 3:25