Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
Posts: 108
Registered: ‎01-18-2012
My Device: 9360
My Carrier: AIRTEL

gridfieldmanager throwing IllegalStateException on add method

Hi, 


I have run into some strange issue, My application is running fine on 9900 simulator and also 9360 device. But when I run the app on BB Torch (device), it is throwing me an IllegalArgumentException on add method on gridfieldmanager

 

here is my code 

 

 

MyScreen extends MainScreen {

                  GridFieldManager grid;

	           MyScreen() {
                               grid = new GirdFieldManager();
				grid.add(lblCategory, Field.FIELD_LEFT);
				grid.add(category, Field.FIELD_RIGHT);
                   }

}

 

 

any help is greatly appreciated. 

 

thx, 

Srinivas

Highlighted
Developer
Posts: 285
Registered: ‎08-26-2011
My Device: 9900
My Carrier: Not Specified

Re: gridfieldmanager throwing IllegalStateException on add method

[ Edited ]

Instead of giving like this:

 

grid=new GridFieldManager(3, 3, 0);//The three perameters are rows, columns and style;

You gave like this:

 

grid = new GirdFieldManager();

and at last forgot to give the add(grid);

 

If you are not understand please check this post;

 

Sample code for GridFieldManager


================================================================================

Feel free to click LIKE button if the solution is correct;

=================================================================================
Feel free to click LIKE button if the solution helps you;
--
Regards,

ALI SHAIK.