Skip to main content

Empty statemachine base???

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-03-31

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
[prettify]<span class="kwd">public</span><span class="pln"> </span><span class="kwd">class</span><span class="pln"> </span><span class="typ">StateMachineBase</span><span class="pln"> </span><span class="pun">{</span><span class="pln"><br />    </span><span class="kwd">public</span><span class="pln"> </span><span class="typ">StateMachineBase</span><span class="pun">(</span><span class="typ">String</span><span class="pln"> s</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{}</span><span class="pln"><br /></span><span class="pun">}</span><span class="pln"><br /></span>[/prettify]
And My StateMachine code is this:
[prettify]<span class="kwd">public</span><span class="pln"> </span><span class="typ">StateMachine</span><span class="pun">(</span><span class="typ">String</span><span class="pln"> resFile</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln"><br />    </span><span class="kwd">super</span><span class="pun">(</span><span class="pln">resFile</span><span class="pun">);</span><span class="pln"><br />    </span><span class="com">// do not modify, write code in initVars and initialize class members there,</span><span class="pln"><br />    </span><span class="com">// the constructor might be invoked too late due to race conditions that might occur</span><span class="pln"><br /></span><span class="pun">}</span><span class="pln"><br /><br /></span><span class="com">/**<br /> * this method should be used to initialize variables instead of<br /> * the constructor/class scope to avoid race conditions<br /> */</span><span class="pln"><br /></span><span class="kwd">protected</span><span class="pln"> </span><span class="kwd">void</span><span class="pln"> initVars</span><span class="pun">()</span><span class="pln"> </span><span class="pun">{</span><span class="pln"><br /></span><span class="pun">}</span><span class="pln"><br /></span>[/prettify]
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.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-07

That's a bug in the current resource editor. Just open the resource file and save it again (you might need to make a modification to the file to let it happen) and the state machine will be properly generated.
I'll commit a fix soon.