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
Highlighted
Developer
Posts: 21
Registered: ‎09-25-2009
My Device: 9700
My Carrier: Turkcell
Accepted Solution

Send Parameters to Class

Hello,

 

I want to code a grid control class.

 

I have a main screen. and data grid screen.

 

I want to send some parameters from main screen to data grid screen.

 

Sample Code :

 

// main table class that provides constructor to display UI components
class dataGrid extends UiApplication implements TrackwheelListener, KeyListener {
   
    // Private members of table class
    private VerticalFieldManager mainVerticalManager;
    private VerticalFieldManager vfmColumns[];
    private HorizontalFieldManager mainHorizontalManager;
   
    // main function that serves as the entry point for the BlackBerry application
    // Calls the dataGrid constructor to display the UI components
    public static void main(String [] args)
    {
        dataGrid app = new dataGrid(args[1], args[2], args[3], args[4]);   // it is wrong, i know.

       app.enterEventDispatcher();
    }
   
    // dataGrid constructor
    public dataGrid(String strGridTitle, int intColumnCount, String astrColumnTitles[], String astrColumnValues[])
    {
        // Instance of FullScreen (extends Screen) to display all the UI components on
        FullScreen gridScreen = new FullScreen();
         ....

    }

}

 

I need 4 input parameter in dataGrid class. How can initialize this dataGrid class with this parameters ?

 

I have to contruct this dataGrid class like this :

 

dataGrid frmDataGrid = new dataGrid (param1, param2, param3, param4);

 

But how can i contruct this class. There are 4 parameters and types are a String, an Integer and two String Array.

 

I searched in this forum of this problem but i can't find or i can't find right search key.

 

Thanks for your help,

 

Ferhat Ikbal

www.bestcoder.net

Developer
Posts: 21
Registered: ‎09-25-2009
My Device: 9700
My Carrier: Turkcell

Re: Send Parameters to Class

I solved the problem. Thanks