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: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: why my actions are there two times?

No, but looking at what I'm doing isn't likely the best way to debug this. The guys with the problem need to shrink it down to the minimum that reproduces the issue, and post it. Then those of us who don't have the problem can run it and see whether it fails for us as well. At least, that's the most efficient way.

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!
Highlighted
New Contributor
Posts: 8
Registered: ‎09-27-2012
My Device: BB 10 Dev Alpha
My Carrier: Roger

Re: why my actions are there two times?

Same as my.

On the eclipse, the screen layout is fine, but when I deployed to simulator or bb dev alpha phont, it happens.

Developer
Posts: 849
Registered: ‎03-03-2011
My Device: Z10

Re: why my actions are there two times?

[ Edited ]

Code and screenshot:


 

import bb.cascades 1.0

Page 
{
    id: loginPage
    objectName: "loginPage"
    
    actions:
	    [
	        ActionItem
	        {
	            ActionBar.placement: ActionBarPlacement.OnBar
	            title: "Login"	            
	        }
	    ]
}

 

--------------------------------------------------------------------------------------
Leader of Ljubljana BlackBerry Developer Group
BlackBerry Certified Builder for Native Application Development
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: why my actions are there two times?

With that as the contents of my .qml, and nothing else, I get a single Action called "Login" at the bottom, nicely centered.

I started with the basic empty template for a Cascades app in Momentics. Nothing else done to it except to replace the main.qml contents.

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
Posts: 849
Registered: ‎03-03-2011
My Device: Z10

Re: why my actions are there two times?

Unbelievable. An app in a new project shows one login action. Why?
--------------------------------------------------------------------------------------
Leader of Ljubljana BlackBerry Developer Group
BlackBerry Certified Builder for Native Application Development
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: why my actions are there two times?

Answering that is why someone has to do the hard work of stripping the extra bits out of their own failing app, until they either end up back at the same point as we just did with a new app, or the problem goes away. Pretty much guaranteed they'll find the source of the problem during that, and can post the solution here. Remotely possible they'll still have it fail, in which case we'll identify some Momentics configuration problem or a similar cause.

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
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: why my actions are there two times?

Thanks a lot. At least, we find a solution for this issue. I spent a lot of time to create and recreate qml and compaire another examples, but can not find why only this happen on my application.

Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: why my actions are there two times?

I recreated a project, it's still not work for me.

 

here is my codes

  Page {
        id: pgSignIn
        actions: [
            ActionItem {
                id: aiHelp
                title: "Help"
                imageSource: "asset:///images/icons/help.png"
                ActionBar.placement:ActionBarPlacement.OnBar
                onTriggered: {
                    var page = pageHelp.createObject();
                    navPanel.push(page);
                }
            },
            ActionItem {
                id: aiForgetPassword
                title: "Forgot Password"
                imageSource: "asset:///images/icons/password.png"
                 ActionBar.placement:ActionBarPlacement.OnBar
                onTriggered: {
                    var page = pageForgotPassword.createObject();
                    navPanel.push(page);
                }
            },
            ActionItem {
                id: aiConatctSupport
                title: "Contact Support"
                imageSource: "asset:///images/icons/phone.png"
                 ActionBar.placement:ActionBarPlacement.OnBar
                onTriggered: {
                    cs.callSupport();
                }
            },
            ActionItem {
                id: aiMoreInfo
                title: "More Info"
                imageSource: "asset:///images/icons/info.png"
                 ActionBar.placement:ActionBarPlacement.OnBar
                onTriggered: {
                    var page = pageMoreInfo.createObject();
                    navPanel.push(page);
                }
            }
        ]
 Container {
...
}
}

 

Developer
Posts: 160
Registered: ‎01-27-2012
My Device: Playbook
My Carrier: Rogers

Re: why my actions are there two times?

I've had the same experience with GoodCitizen.  I tried to convert it to Beta 3 and gave up for the time being because of some propagation issues with Tabs and because of ridiculous number of action items spawning from just 3 occurances.   There must be a bug with ActionBarPlacement.OnBar because there is only one occurence of the last 3 items (which are not on the bar).

 

       actions: [
            ActionItem {
                title: "Translate"
                imageSource: "asset:///images/actions/translate.png"
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    _goodCitizen.setTouchMode("translate");
                    //                  _navPane.deprecatedPushQmlByString("ToolAxis.qml");
                    navPane.push(toolaxis);
                }
            },
            ActionItem {
                title: "Rotation"
                imageSource: "asset:///images/actions/rotate.png"
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    _goodCitizen.setTouchMode("rotate");
                    //                   _navPane.deprecatedPushQmlByString("ToolAxis.qml");
                    navPane.push(toolaxis);
                }
            },
            ActionItem {
                title: "Scale"
                imageSource: "asset:///images/actions/scale.png"
                ActionBar.placement: ActionBarPlacement.OnBar
                onTriggered: {
                    _goodCitizen.setTouchMode("scale");
                    //                   _navPane.deprecatedPushQmlByString("ToolAxis.qml");
                    navPane.push(toolaxis);
                }
            },
            ActionItem {
                title: "Color"
                imageSource: "asset:///images/actions/colour.png"
                onTriggered: {
                    //                   _navPane.deprecatedPushQmlByString("Color.qml");
                    navPane.push(colour);
                }
            },
            ActionItem {
                title: "Objects"
                imageSource: "asset:///images/actions/objects.png"
                onTriggered: {
                    //                    _navPane.deprecatedPushQmlByString("Objects.qml");
                    navPane.push(objects);
                }
            },
            ActionItem {
                title: "Reset"
                imageSource: "asset:///images/actions/reset.png"
                onTriggered: {
                    _goodCitizen.reset();
                }
            }
        ]

 

 

IMG_00000026.png

---
If you find my post helpful please "like" it and "accept as a solution"
Developer
Developer
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: why my actions are there two times?

if this may help, i had the same issue too when beta 3 came out and gave up trying to figure it out....it was most likely caused by using an eclipse project or workspace from beta2....

 

if you re-create your project with a brand new beta3 project, copy/paste your source codes / assets, everything will magically work fine! If this still doesn't work, try a whole new eclipse workspace ;-)