2013-04-10 90 views
0

我试图让我的HelloWorld和action事件触发。即时通讯使用的图形用户界面,当它自动创建:CodeName One,Action event not working-需要说明

protected void onMain_Button1Action(Component c, ActionEvent event) { 
    // If the resource file changes the names of components this call will break notifying you that you should fix the code 
    super.onMain_Button1Action(c,event);  
} 

我知道它不是去上班,因为没有超类中同类型的空白。

protected void onMain_Button1Action(Component c, ActionEvent event) { 
    // If the resource file changes the names of components this call will break notifying you that you should fix the code 
    Dialog.show("Test", "it works", "OK",null); 
} 

而我仍然没有得到任何东西。我寻找其他教程如何使用代号作为一个,但我无法找到任何。我没有得到作者的作品。如果有人能折腾我,我会非常感激。

回答

1

您需要将资源文件保存在设计器中,而不要将调用删除到超级。如果您使用的是Eclipse,则应在使用F5保存到设计器后刷新项目。