BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-29-2007, 01:59 AM   #1
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Question "java.lang.illegalStateException" Layout requested during layout

Please Login to Remove!

Hi All

Please help me in resolving this exception, I got from the latest 8800 device JDE Simulator.

The detail exception message is "Layout requested during layout".

This exception occurs while trying to view a mainscreen custom application and this terminates the execution and if I press the Step Into button several times, It continues to display the screen.

Thanks In Advance
Anand
Offline  
Old 06-29-2007, 08:58 AM   #2
bemshaswing
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Default

If you paste your code we could take a look
Offline  
Old 07-02-2007, 01:53 AM   #3
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Exclamation Hi

Hi bemshaswing,



This is the code that creates this exception.

Code:
if (result.trim().length() > 0) {
   if (COMM.isPhoneField(fg) || COMM.isEmailField(fg) || COMM.isURLField(attribute)) {

   ActiveAutoTextEditField tt = new ActiveAutoTextEditField(keylabel, result, lenid1,Field.FOCUSABLE);
   tt.setEditable(false);
   vfmfields.add(tt);

   } else {

   AutoTextEditField ttt = new AutoTextEditField(keylabel,result, lenid1, Field.FOCUSABLE);
   ttt.setEditable(false);
   vfmfields.add(ttt);

   }  
}
If I comment the "if (result.trim().length() > 0)" statement checking the exception is no more there, but this will show on the screen some fields(ActiveAutoTextEditField/ AutoTextEditField) that are not intended to show (since they may not contain any values-- empty fields on screen is inappropriate).

and this exception causes only on device 8800, on other devices it's not creating any exception if you not comment the
"if (result.trim().length() > 0)" statement checking

Please tell me If you have any idea to resolve ?

Thanks
Anand

Last edited by Ananthasivan V K; 07-02-2007 at 02:01 AM.. Reason: Code Alignment -- Formatting
Offline  
Old 07-02-2007, 08:10 AM   #4
bemshaswing
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Default

What is the class of "result"? Is it a UI Object?
Offline  
Old 07-02-2007, 08:29 AM   #5
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Default

No, it is of type "String"
Offline  
Old 07-02-2007, 11:02 AM   #6
bemshaswing
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Default

Seeing as what you've pasted there actually does no layout itself, I'd guess that you're getting a misleading exception. It is possible that this method would throw a null pointer exception on a null String when applying trim (or length for that matter). It's possible that the calling method may be trying to layout a null object because the exception has gone uncaught. This is only a guess given your context here though.
Offline  
Old 10-05-2007, 07:14 AM   #7
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Unhappy Problem with ActiveAutoTextEditField in 8800

Hi

I need to use ActiveAutoTextEditField UI component in my program. This when I tested with 8800 device simulator
always creates exception.
This exception occurs only when I try to setText a string that is like [email address].
Can anybody help me to getover this
trouble ?

Hoping the best.
__________________
Regards
Anand.

Last edited by Ananthasivan V K; 10-05-2007 at 08:46 AM.. Reason: To Give More Accuracy
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16) picture

Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16)

$189.99



VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250 picture

VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250

$79.99



HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee picture

HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee

$235.94



Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue picture

Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue

$141.00



Sketchy Chics - June 2021 - December 2022. Vintage Collection Art picture

Sketchy Chics - June 2021 - December 2022. Vintage Collection Art

$22.50



Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair picture

Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair

$199.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.