状态机基础为空?

发布于 2024-10-31 06:41:27 字数 937 浏览 1 评论 0原文

你好,我最近开始使用资源编辑器,我有一个问题:我正在尝试在资源编辑器中创建一个简单的项目,仅用于测试目的:没有什么特别的,只是一个带有 hello world 的标签,但是当我按下“创建 Netbeans 项目”时所有项目(JavaSE、MIDP、RIM)均已创建,但没有一个正在运行。在普通的 Java 中,我只是看到黑屏,而在 MIDP 模拟器中,我收到一条消息“此应用程序在后台运行”。

我的 StateMachineBase 代码是这样的

public class StateMachineBase {
    public StateMachineBase(String s) {}
}

我的 StateMachine 代码是这样的:

public StateMachine(String resFile) {
    super(resFile);
    // do not modify, write code in initVars and initialize class members there,
    // the constructor might be invoked too late due to race conditions that might occur
}

/**
 * this method should be used to initialize variables instead of
 * the constructor/class scope to avoid race conditions
 */
protected void initVars() {
}

所以我猜我的程序显然不会做任何事情,因为没有代码。我做错了什么?根据我的理解,StateMachineBase 应该拥有所有锅炉代码。我正在使用 Netbeans 6.9.1 、Lwuit 最新版本和 JavaME SDK 3.0 和诺基亚 S60 SDK。

谢谢。

hello I recently started using Resource editor and I have a question:I 'm trying to create a simple project just for test purposes in Resource Editor:nothing special just a Label with a hello world, but when I push "create Netbeans project" while all the projects(JavaSE,MIDP ,RIM) are created none of them are running. In normal JaVA I just get a black screen and in MIDP emulator I get a message saying "This application runs in the background".

My StateMachineBase code is this

public class StateMachineBase {
    public StateMachineBase(String s) {}
}

And My StateMachine code is this:

public StateMachine(String resFile) {
    super(resFile);
    // do not modify, write code in initVars and initialize class members there,
    // the constructor might be invoked too late due to race conditions that might occur
}

/**
 * this method should be used to initialize variables instead of
 * the constructor/class scope to avoid race conditions
 */
protected void initVars() {
}

So I'm guessing my prgramm obviously won't do anything since there is no code. What am I doing wrong? From my understanding StateMachineBase should have all the boiler code.I'm using Netbeans 6.9.1 ,Lwuit latest version and JavaME SDK 3.0 and Nokia S60 SDK.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

药祭#氼 2024-11-07 06:41:27

好吧,我会回答我自己的帖子。我随机发现,如果保存 res 文件并重新打开它,那么它就可以正常工作。 Shai Almog 在他的博客中证实了这一点,称这是一个错误,将在下一版本中修复。

Shai 对我的帖子的回答

Well I shall answer my own post. Randomly I found out that if you save the res file and reopen it then it works fine. This was confirmed by Shai Almog in his blog saying that this is a bug that will be fixed in the next release.

Shai's answer to my post

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文