Pack component 4.7 - Overview icon does not change

Hello

I use Eclipse.  Compilation with BB component pack 4.7.

I have a master project (CLDC) and a second project (CDLC replacement Entry Point). The second project is checked system and startup.

Note: the second entry point was to record a personalized for the app, not on the icon menu item.

I right click on the "main" project-> properties-> Blackberry Project Properties-> resources.

I select an icon file (1.png) in the dialog box "files of icons".

I select a second (2.png) icon file in the "Icons of focus files" dialog box.

I clean, compile, run under a 'new' "BOLD" Simulator (9000) and my app has the icon "no-focus".

When I reversal, it does not change.

What I've read, 4.7 is supposed to make this easy.  It seems to be advantageous, so I don't know I'm missing something that is obvious (to everyone except me).  I am new to Java and Eclipse, but really get the hang of it... so far, it's...

Does anyone have any ideas why this might not work?

Thank you!

You project must have an entry point with parameter. This additional entry point must be defined as "Autostart". Add the parameter's main entry: gui

And check the code below. This works.

import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.MainScreen;import net.rim.device.api.system.Bitmap;import net.rim.device.api.system.ApplicationManager;import net.rim.blackberry.api.homescreen.HomeScreen;

public class HomeScreenIcon extends UiApplication{    public static void main(String[] args)    {        //Check for the argument defined in the project properties.        if (args != null && args.length > 0 && args[0].equals("gui"))        {           HomeScreenIcon theApp = new HomeScreenIcon(false);            theApp.enterEventDispatcher();        }        else        {            HomeScreenIcon theApp = new HomeScreenIcon(true);            theApp.enterEventDispatcher();        }    }    public HomeScreenIcon(boolean autoStart)    {        if (autoStart)        {        //The application started using the auto start entry point.        //Setup the rollover icons.        final Bitmap regIcon = Bitmap.getBitmapResource("1.png");        final Bitmap icon = Bitmap.getBitmapResource("2.png");

        invokeLater(new Runnable()        {            public void run()            {                ApplicationManager myApp =                  ApplicationManager.getApplicationManager();                boolean keepGoing = true;

                while (keepGoing)                {                    //Check if the BlackBerry has completed its startup process.                    if (myApp.inStartup())                    {                        //The BlackBerry is still starting up, sleep for 1 second.                        try                        {                            Thread.sleep(1000);                        }                        catch (Exception ex)                        {                          //Couldn't sleep, handle exception.                        }                    }                    else                    {                        //The BlackBerry has finished its startup process.                        //Set the rollover icons.                        HomeScreen.updateIcon(regIcon, 0);                        HomeScreen.setRolloverIcon(icon, 0);                        keepGoing = false;                    }                 }                 //Exit the application.                 System.exit(0);            }        });

    }    else    {         //The application was started by the user.         //Start the application and display a GUI.         MainScreen ms = new MainScreen();         ms.setTitle(new LabelField("Hello there."));         pushScreen(ms);    }  }}

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for