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
Contributor
Posts: 26
Registered: ‎07-26-2010
My Device: Not Specified
Accepted Solution

Main Method Argument GUI

Hi 

I have doubt with arguments passed to main.
When i refer MessageListDemo app in RIM samples   C:\Program Files\Research In Motion\BlackBerry JDE 6.0.0\samples\com\rim\samples\device\messagelistdemo  i found
if(args.length == 1 && args[0].equals("startup"))

if(args.length == 1 && args[0].equals("gui"))
if(args.length == 1 && args[0].equals("startup"))
 {
              xxxxxxxxxxxxx  

}
 else if(args.length == 1 && args[0].equals("gui"))
  {
             xxxxxxxxxxxxxx

 }

 

 

 
if i see MessageListDemo_autostartup.jdp i can see startup as argument

and I have not find where gui is given.

Is gui by default blackberry OS is provideing or how it is generated. PLease help very important
 
 

Thanks,
kusuma

Developer
Posts: 16,637
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Main Method Argument GUI

no, the argument is not given by default, it would have to be stated in the gui project description (jdp)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 26
Registered: ‎07-26-2010
My Device: Not Specified

Re: Main Method Argument GUI

simon,

 

 

You are correct in case of userdefined arguments.

I have checked the .jdp of sample found only starup and no gui found.

Then from which location the app is listening to "gui". Please clarify.

 

Thanks,

kusuma

 

Developer
Posts: 16,637
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Main Method Argument GUI

maybe the sample is not correct.
you can remove the second condition so that the gui is launched by default, or you can edit the jdp of the gui part to include "gui" as an argument.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 19,623
Registered: ‎07-14-2008
My Device: Not Specified

Re: Main Method Argument GUI

Not sure this helps, and I can't remember exactly how or where, but I found in some circumstance, the application was being started with "gui", when I had not actually specified this. 

 

If my memory serves, it was when I had the application auto started by some interaction with a map or something else in the system, where I told the OS to start my application. 

 

So as a general rule I always specify gui for the icon start and always specify it.