09-30-2008 05:45 AM
I have an application with a login screen which has a ActiveAutoTextEditField for a username (which is an email address). If an email address is displayed in the field, and the user highlights it and selects the "Cut" menu item a java.lang.securityexception is thrown and the application exits.
We are currently testing our application on 3 different devices - 8800, 8310, 8100. This error occurs on both the 8800 and 8310 devices, but not the 8100. I cannot replicate this error in any of the simulators on my PC.
Does anybody have any suggestions for resolving this issue, or know if I am able to remove the offending "Cut" menu item from the context menu?
Solved! Go to Solution.
09-30-2008 06:30 AM
Long time ago I got the same problem with Date field on JDE 4.0 with BB 7290 device.
Exception occured when I ran Menu-Copy.
I implemented the following workaround.
/** * Invoked when the trackwheel is clicked. * @param status - Modifier key status. * @param time - Ticks since device reset. * @return True if the event was consumed; otherwise, false. */ public boolean trackwheelClick(int status, int time) { try{ Menu menu = new Menu(); makeMenu(menu, 0); menu.show(); } catch(Exception e){ // HACK!!!!! // this try-catch added to prevent SecurityException on device // (on simulator this bug does not appear) // When user tries to do the following // Open menu on date field, and select "Copy" // I do nothing here, I am just catching and ignoring this exception } return true; }
Just catch and ignore this exception in place where you invoke the menu.
10-01-2008 10:12 AM