openGeeksLab / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

ClassCastException on iPad setting Button UIID to ComboBox #710

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using CodeName One v1.0.0.201305011553.

1. in the designer create a container and add a Button
2. set the UIID of the button to "ComboBox" to make it look like a combobox
3. in the code using the UIBuilder to get the component: 

Button button = (Button) UIBuilder.findByName("c_Dropdown", container);

This all works fine on the iPhone, i.e. the button is styled as a ComboBox. On 
the iPad however (both device and simulator) it throws a 
java.lang.ClassCastException at that line.

Are there any restriction on styling on different platforms?

Original issue reported on code.google.com by khash...@gmail.com on 14 May 2013 at 12:24

GoogleCodeExporter commented 9 years ago
Without sample code I doubt this is the case. I'm guessing you did an override 
resource for tablets/ipads and forgot about that.

Original comment by shai.almog on 14 May 2013 at 5:18

GoogleCodeExporter commented 9 years ago
You guessed right, I have forgotton to verride the resource for iPad. It works 
fine now, thanks for your help.

Original comment by khash...@gmail.com on 15 May 2013 at 11:21