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

BlackBerry® World™ Development

Reply
New Contributor
marciokoko
Posts: 5
Registered: ‎05-16-2011
My Device: 8900
My Carrier: Digicel

MenuItem deprecated

Im running thru the UserInterface A11 tutorial using eclipse and the bb plugin.  Ive finished the app but i get this:

 

 

private MenuItem _close = new MenuItem("Close", 110, 10) {
         public void run(){
         onClose();
         }
The constructor MenuItem(String, int, int) is deprecated...
But when i googled it i got a complicated (StringProvider,int,int) which i dont understand.  pls hlp

 

Please use plain text.
Developer
QuiteSimple
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi

Re: MenuItem deprecated

 

MenuItem(StringProvider,int,int)

 

 

This code is introduced in 6.0, so if you use it, your app won't run on lower versions like 5.0, 4.7, 4.6 etc.

You can use the old MenuItem constructor, although it is deprecated.

 

However if you want to develope for OS 6.0 only, use this approach

 

 

StringProvider stringProvider = new StringProvider("Close");
private MenuItem _close = new MenuItem(sringProvider , 110, 10) {
...

 

 

 



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Please use plain text.
New Contributor
marciokoko
Posts: 5
Registered: ‎05-16-2011
My Device: 8900
My Carrier: Digicel

Re: MenuItem deprecated

Ok, then I have something wrong set up because I wasnt necessarily building for 6.0OS.  But i guess it makes sense now because i saw the torch simulator come up even though i specifically downloaded the 8900 sim.  So that means that my run configuration is saying that its 6.0, right?

Please use plain text.
Developer
QuiteSimple
Posts: 1,452
Registered: ‎11-06-2009
My Device: Torch 9810
My Carrier: WiFi

Re: MenuItem deprecated

 


So that means that my run configuration is saying that its 6.0, right?

Yes, it seems so :smileyhappy:

 



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Please use plain text.