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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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

Re: why my actions are there two times?

Or archive project into ZIP and then import project in a new workspace?
--------------------------------------------------------------------------------------
Leader of Ljubljana BlackBerry Developer Group
BlackBerry Certified Builder for Native Application Development
Developer
Posts: 100
Registered: ‎10-01-2012
My Device: BB10 Dev Alpha
My Carrier: Roger

Re: why my actions are there two times?

Thanks. It can work; So summarize the answer is
1. new workspace
2. new project,
3. import the old project as a zip file
4. modify the code as you post.
Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: why my actions are there two times?

I also had this problem and narrowed it down to it happening when I added this line to the source code :

 

 qml->setContextProperty("cppObject", this);

 

There seems to be a bug in the action item display.  If you see this problem you can try commenting out the context setting to see if it shows properly.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Contributor
Posts: 10
Registered: ‎10-13-2011
My Device: 9900
My Carrier: T-mobile

Re: why my actions are there two times?

Anobody tried with new SDK Beta 4? Has been fixed?

Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: why my actions are there two times?

I did..not fixed yet.

Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: why my actions are there two times?

Got this back and plan to try later....

  QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
 
    // GOOD position
    qml->setContextProperty("cs",this);
 
    // create root object for the UI
    AbstractPane *root = qml->createRootObject<AbstractPane>();
 
    // BAD position
    qml->setContextProperty("cs",this);
 
    // set created root object as a scene
    app->setScene(root);
}

Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: why my actions are there two times?

I can confirm that my problem is solved.  I needed to put the  "  qml->setContextProperty("cs",this);"  

before " app->setScene(root);"

 

 


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
New Developer
Posts: 5
Registered: ‎02-18-2013
My Device: Z10
My Carrier: Maxis

Re: why my actions are there two times?

[ Edited ]

FYI, this is still not solved in 10.0.10.261

 

Had this problem and lucky enough to found this thread. Just setContextProperty() before createRootObject() will do, there is no need to switch workspace etc.

 

/floAt

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

Re: why my actions are there two times?

Can you update this stating what you did?

 

https://www.blackberry.com/jira/browse/BBTEN-343?page=com.atlassian.jira.plugin.system.issuetabpanel...

 

I haven't tried it yet in 10.0.10 so I haven't responded.

---
If you find my post helpful please "like" it and "accept as a solution"
Highlighted
Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: why my actions are there two times?


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing