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
Posts: 163
Registered: ‎01-30-2013
My Device: Blackberry 10 Simulator
Accepted Solution

Action items get duplicated - why?

Hi,

 

I have this code for adding action item to my page:

 

...
          
    actions: [
        ActionItem {
            title: "Action 1"
            ActionBar.placement: ActionBarPlacement.OnBar
              
            onTriggered: {
                myLabel.text = "Action 1 selected!"
            }
        }
    ]
    
....

} // end of Page

 In the QML preview, just one action item is shown as above -- but when I run the application, there are two duplicates of the above action item. Does anyone have any idea why? Thanks.

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

Re: Action items get duplicated - why?

Refer to this post: http://supportforums.blackberry.com/t5/Cascades-Development/Duplicate-actionbar-buttons/m-p/2157969#...

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!