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

Native Development

Reply
Developer
jmoukel
Posts: 111
Registered: ‎07-05-2012
My Device: none
Accepted Solution

BB10: Same ActionItem Repeated in ActionBar

Hi guys,

 

as the title says, I have the same Action Item repeated two times in the Action Bar. So, I have three buttons in the Action Bar when I should have just one. I just defined one Action Item.

 

I've been struggling the whole day with this.

 

Any idea of why this is happening?

 

Thanks a lot.

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: BB10: Same ActionItem Repeated in ActionBar

The classic mistake causing this appears to be using setContextProperty() any time after your createRootObject() call. It must come before.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
jmoukel
Posts: 111
Registered: ‎07-05-2012
My Device: none

Re: BB10: Same ActionItem Repeated in ActionBar

[ Edited ]

Thanks a lot peter9477!

 

You saved me from hours of struggling. I'd give you more "likes" if I could.