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.
Hi - I can no longer compile my application after upgrading from 5.0beta2 to 5.0. Actually, I just tested, and the same problem exists for new applications. In the Midlet screen designer, you can specify a 'layout' property for ImageItem objects. The choices are NONE, LEFT, RIGHT, CENTER, etc. In previous Netbeans 5.0beta2, the generated code would contain the actual value of the constant (eg. 0x301, 0x302). After upgrading to Netbeans 5.0, all my constants automatically changed to Item.LAYOUT_DEFAULT, Item.LAYOUT_CENTER etc etc. Unfortunately, the Item class does not contain these constants, they are in the ImageItem class - ( ImageItem.LAYOUT_CENTER, etc ). Is there a quick fix I can make for this to save waiting for a fixed release (or down-grading to 5.0beta2) ? Love netbeans otherwise, regards, rob.
it seems that you are using MIDP 1.0 in your emulator platform. reassigning to breh - there wasn't any change like this between RC2 and FCS, am I right?
increasing priority to P1. Users cannot work with ImageItem in MIDP 1.0 There isn't any workaround for this issue. It generates code with Item.LAYOUT_DEFAULT even for MIDP1.0 The code is uncompilable in MIDP1.0! I thought that I could workaround it in post-init section but I cannot rid of the Item.LAYOUT_DEFAULT in the guarded section
there is one _UGLY_ workaround for people that want to use ImageItem in Mobility Pack in MIDP1.0 Copy to pre-init section the commands in guarded block of ImageItem and comment out the commands in guarded block. Ca E.g. public ImageItem get_imageItem1() { if (imageItem1 == null) { // Insert pre-init code here imageItem1 = new ImageItem("imageItem1", get_image1(), ImageItem.LAYOUT_DEFAULT, null); /* <GUARDED>imageItem1 = new ImageItem("imageItem1", get_image1(), Item.LAYOUT_DEFAULT, null); </GUARDED> */ // Insert post-init code here } return imageItem1; }
This bug is caused that a layout is declared on Item and ImageItem too they are using the same descriptor and editor. Solution is to make Image.layout property declared using another descriptor and editor. Editor must recognize the MIDP version to filter available options.
Fixed in main trunk. PropertyEditor was not changed because it does not affect stored data format. Lukasi, should I resolve this bug as FIXED? Or should I wait until the patch will be commited into NB 5.5 branch too?
the process is: 1, fix in trunk, mark as FIXED, set Target Milestone to dev 2, test, write that it's verified in trunk 3, commit to branch and set TM=5.5 marking as fixed+TM for now
*** Issue 73193 has been marked as a duplicate of this issue. ***
verified with trunk build. There is used ImageItem.LAYOUT instead of Item.LAYOUT
Verified in branch 20060418
close old issues