10-15-2012 11:58 PM - edited 10-16-2012 12:02 AM
I have re-created a project using cascade c++ project, then copy codes and assets from old to new project.
Then I compared the bar file and .pro file to add the libs as needed.
But I faced the same problem.
I can't find what's the difference between my old and new project.
Hope someone can figure it out.
PS: new workspace... good idea, becuase I still use the workspace that created from beta2.
I will try it tomorrow and let everyone know.
10-16-2012 11:25 AM
After I created a new workspace and copy my assets, src, .pro. It still can not work.
10-16-2012 05:28 PM
Solved!
I changed the sequence of calls from:
loginRoot = loginQml->createRootObject<AbstractPane>();
loginQml->setContextProperty("bpm", manager);
to:
loginQml->setContextProperty("bpm", manager);
loginRoot = loginQml->createRootObject<AbstractPane>();
The method setContextProperty must be called before method createRootObject!!! Only in this case there are no duplicates.
10-16-2012 06:02 PM
10-16-2012 06:18 PM
10-16-2012 06:49 PM - edited 10-16-2012 06:55 PM
Did you post this as a bug? I have another app where the action items work and the createRootObject is after contextProperty. However, If the sequence is what matter's how are you supposed to reverse the order it in this context?
// The application NavigationPane is created from QML.
m_navPane = qml->createRootObject<NavigationPane>();
if (m_navPane) {
m_pOpenGLThread = new OpenGLThread();
m_pGoodCitizen = new GoodCitizen();
//m_pGoodCitizen->moveToThread(m_pOpenGLThread);
m_pOpenGLThread->addView(m_pGoodCitizen);
qml->setContextProperty("_navPane", m_navPane);
qml->setContextProperty("_goodCitizen", m_pGoodCitizen);
qml->setContextProperty("_openGLThread", m_pOpenGLThread);
..
10-17-2012 08:55 AM
soaman wrote:
Solved!
I changed the sequence of calls from:
loginRoot = loginQml->createRootObject<AbstractPane>();
loginQml->setContextProperty("bpm", manager);
to:
loginQml->setContextProperty("bpm", manager);
loginRoot = loginQml->createRootObject<AbstractPane>();
The method setContextProperty must be called before method createRootObject!!! Only in this case there are no duplicates.
this fixed the issue with the actions. but now my buttons are not working anymore o.O
10-17-2012 10:05 AM
Here is my solution, my error came because i had a old workspace.
this solved the problem for me
10-17-2012 10:25 AM
I've submitted this as a bug:
https://www.blackberry.com/jira/browse/BBTEN-343
10-17-2012 12:33 PM
Do you mean?
1. create a new workspace
2. create a new project
3. import src, qml
4. follow the codes as you post
loginQml->setContextProperty("bpm", manager);
loginRoot = loginQml->createRootObject<AbstractPane>();