NegativeArraySize Exception in my Theme

23 views
Skip to first unread message

venkatramanan r

unread,
May 1, 2012, 2:35:00 AM5/1/12
to codenameone...@googlegroups.com
Hello everyone,

     I am getting NegativeArraySize Exception when in add my theme to my application.

     Why this exception is coming? and how to fix this problem?

venkatramanan r

unread,
May 1, 2012, 4:43:11 AM5/1/12
to codenameone...@googlegroups.com
I am Using the Designer.exe that came with my private beta version.

Shai Almog

unread,
May 1, 2012, 5:37:42 AM5/1/12
to codenameone...@googlegroups.com
How do you reproduce this error?
What is the stack trace?
The exe is no longer supported/available for some time. Try the Jar version from command line to get the stack trace for the error.

venkatramanan r

unread,
May 1, 2012, 6:52:31 AM5/1/12
to codenameone...@googlegroups.com
Thank u shai.

 I downloaded the Designer jar. When i tried to pick my application i got the following error

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:224)

        at com.codename1.designer.PickMIDlet.okButtonActionPerformed(PickMIDlet.
java:387)
        at com.codename1.designer.PickMIDlet.access$300(PickMIDlet.java:69)
        at com.codename1.designer.PickMIDlet$FormListener.actionPerformed(PickMI
Dlet.java:329)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
95)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6263)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6028)
        at java.awt.Container.processEvent(Container.java:2041)
        at java.awt.Component.dispatchEventImpl(Component.java:4630)
        at java.awt.Container.dispatchEventImpl(Container.java:2099)
        at java.awt.Component.dispatchEvent(Component.java:4460)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574
)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)



How to fix it?

Shai Almog

unread,
May 1, 2012, 7:00:52 AM5/1/12
to codenameone...@googlegroups.com
Use the reset feature.
The Pick Application feature is no longer supported and will be removed completely in the upcoming update.

venkatramanan r

unread,
May 1, 2012, 1:23:13 PM5/1/12
to codenameone...@googlegroups.com

  Do u mean the Codename one -> Advanced -> Reset netbeans settings?

  By pressing that nothing is happening. how to get the live preview of my application in the designer window?
 
   Please help in this.

venkatramanan r

unread,
May 1, 2012, 1:42:33 PM5/1/12
to codenameone...@googlegroups.com
 I made a theme for my application. But the Command  part is  not getting override in the iPhone simulators .... But it works fine in the Android and S40 mobile simulator. how to fix this problem?

Shai Almog

unread,
May 1, 2012, 2:30:28 PM5/1/12
to codenameone...@googlegroups.com
The pick application/MIDlet feature never worked properly and was a source of numerous bugs. We decided to eliminate it. You have live preview for GUI builder applications, since the simulator is really fast you can compile and run the application much faster with the current version so you can manage with that rather well.

The iPhone doesn't have a menu button/softbutton so you need to do one of the following:
1. Don't use commands.

2. Use or derive from the iPhone native theme (includeNativeBool).
http://www.codenameone.com/themeing.html

3. Construct your theme so it will work properly in iOS with a proper title for every page so commands have a place to "go".

venkatramanan r

unread,
May 1, 2012, 2:32:25 PM5/1/12
to codenameone...@googlegroups.com
Thank u shai .
Reply all
Reply to author
Forward
0 new messages