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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
soaman
Posts: 610
Registered: ‎03-03-2011
My Carrier: Mobitel

Re: why my actions are there two times?

Or archive project into ZIP and then import project in a new workspace?
--------------------------------------------------------

Follow our developer blog on Slovenia BlackBerry Developer Group!
Please use plain text.
Developer
noahhuang
Posts: 100
Registered: ‎10-01-2012
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.
Please use plain text.
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
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     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
New Contributor
jenicek
Posts: 9
Registered: ‎10-13-2011
My Carrier: T-mobile

Re: why my actions are there two times?

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

Please use plain text.
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
My Carrier: Rogers

Re: why my actions are there two times?

I did..not fixed yet.

Steven Kader at JaredCo
   Follow me on Twitter     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
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     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
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     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.
New Developer
float
Posts: 5
Registered: ‎02-18-2013
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

Please use plain text.
Developer
Dredvard
Posts: 154
Registered: ‎01-27-2012
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"
Please use plain text.
Developer
StevenKader
Posts: 615
Registered: ‎02-03-2010
My Carrier: Rogers

Re: why my actions are there two times?


Steven Kader at JaredCo
   Follow me on Twitter     BlackBerry Daily News

Feel free to press the like button to thank the user that helped you. Please mark posts as solved if you found a solution.
Please use plain text.