ClassCastException upon keypress to start editing TextArea

28 views
Skip to first unread message

timo.v...@gmail.com

unread,
Feb 19, 2014, 8:34:35 AM2/19/14
to codenameone...@googlegroups.com
I have a Form with a TextArea (and 3 Buttons).
When I show the Form in the Emulator and press any key, the following exception is raised:

java.lang.ClassCastException: com.codename1.ui.TextArea cannot be cast to com.codename1.ui.TextField
at com.codename1.impl.javase.JavaSEPort.editString(JavaSEPort.java:2630)
at com.codename1.impl.CodenameOneImplementation.editStringImpl(CodenameOneImplementation.java:286)
at com.codename1.ui.Display.editString(Display.java:1439)
at com.codename1.ui.TextArea.keyReleased(TextArea.java:526)
at com.codename1.ui.Form.keyReleased(Form.java:1795)
at com.codename1.ui.Display.handleEvent(Display.java:1842)
at com.codename1.ui.Display.edtLoopImpl(Display.java:994)
at com.codename1.ui.Display.mainEDTLoop(Display.java:925)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)

I have no means to verify if the same exception is raised on a device with a physical keyboard, so please confirm this cannot occur on a device.

Shai Almog

unread,
Feb 19, 2014, 1:08:59 PM2/19/14
to codenameone...@googlegroups.com, timo.v...@gmail.com
Are your project client libs up to date? The current SVN seems to map this to a line that doesn't say much to me and I can't reproduce the issue.

timo.v...@gmail.com

unread,
Feb 19, 2014, 1:40:31 PM2/19/14
to codenameone...@googlegroups.com, timo.v...@gmail.com
On Wednesday, February 19, 2014 7:08:59 PM UTC+1, Shai Almog wrote:
Are your project client libs up to date? The current SVN seems to map this to a line that doesn't say much to me and I can't reproduce the issue.

I am puzzled by the client library update process, as I used to frequently run the "Refresh Libs" menu item in Eclipse without effect. But if I sent a build to the server a few seconds later, I got a fresh set of libraries anyway.

So I have sent another build just now, without receiving a new set of libraries.

The exception is still there, and refers to these same linenumbers.

Is there a way to pinpoint which client libraries I am using? (Or is there another trigger to get the latest libraries?)

Shai Almog

unread,
Feb 20, 2014, 2:45:29 AM2/20/14
to codenameone...@googlegroups.com, timo.v...@gmail.com
Refresh libs is for cn1lib's. Yes its confusing, we suck at UX.
You need to go to project preferences and click the "Update client libs" button.

I found the relevant line and I think I fixed this. Thanks.
Reply all
Reply to author
Forward
0 new messages