This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Converted NB 5.5 midlet (visual editor) contains following error in guarded code block: //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable "> /** * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable. * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately * @param nextDisplayable the Displayable to be set */ public void switchDisplayable(Alert alert, Displayable nextDisplayable) { // write pre-switch user code here Display display = getDisplay(); if (alert == null) { display.setCurrent(nextDisplayable); } else { display.setCurrent(alert, nextDisplayable); } // write post-switch user code here } //</editor-fold> Used versions: java version "1.5.0_12" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04) Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode, sharing) netbeans version was 6.0 beta 2.
Where exactly is the error? This code fragment is added there in NetBeans 6.0 since it allows you and IDE to have better control over switching between displayables. It is used by the rest of the generated code instead of calling "getDisplay().setCurrent(...)" directly. Leaving Opened with INCOMPLETE keyword.
Sorry, I forgot to add that :) Reported problem is lack of getDisplay() method. regards Lauri
Created attachment 51649 [details] Java file resulting from conversion
Created attachment 51650 [details] VMD file from conversion
I am unable to open your "ConvertedGOWriteMIDlet2" design since it requires a "util.SplashScreen" component which I do not have. Anyway from the files I see that the design has been converted but the source code was not generated. This could be caused by: 1) You have opened the design but did not save it. 2) Or very likely there is a bug during the convertion (not related to the "getDisplay" issue). Please, could you attach your original .java and .mvd files? Thanks.
Thanks for quick responses! Is it ok, if I send you whole project by email? ZIPed project is <600K in size. Even though application is freeware, I would not like to attack source here at then moment.
Yes, of course - you can send it to me directly.
There were 3 issues discovered during the GoWriteMIDlet2 design file conversion. 1) Item.defaultCommand property was incorrectly set. 2) Decrypting of String array was unable to handle "null" value. 3) Converter did not pass conversion of custom component derived from commands, ticker, svg components and build-in components, therefore they have not been fully converted. All issues above has been fixed in main trunk - see commit log below. Now the design can be converted without an error. Commit log: Checking in midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterBuilt.java; /cvs/mobility/designer2/midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterBuilt.java,v <-- ConverterBuilt.java new revision: 1.7; previous revision: 1.6 done Checking in midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterCustom.java; /cvs/mobility/designer2/midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterCustom.java,v <-- ConverterCustom.java new revision: 1.5; previous revision: 1.4 done Checking in midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterItems.java; /cvs/mobility/designer2/midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterItems.java,v <-- ConverterItems.java new revision: 1.6; previous revision: 1.5 done Checking in midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterUtil.java; /cvs/mobility/designer2/midpconverter/src/org/netbeans/modules/vmd/midp/converter/wizard/ConverterUtil.java,v <-- ConverterUtil.java new revision: 1.8; previous revision: 1.7 done