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
Dredvard
Posts: 160
Registered: ‎01-27-2012
My Device: Playbook
My Carrier: Rogers

Re: Does MenuDefinition not work in QML yet?

Thanks for the feedback about what works and doesn't work in your program.


In the top line of the qml, I did an import of "testing" (which I didn't notice when I was trimming the file down).  Within the testing directory there was a file called Menu.qml.    That name conflict was the cause.

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Does MenuDefinition not work in QML yet?

The existence of a Menu.qml file somewhere was my first guess, but when I created one here to check whether it gave that error, I didn't get any error like it. Strange...

Anyway, glad it's solved!

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!
Please use plain text.
Developer
Dredvard
Posts: 160
Registered: ‎01-27-2012
My Device: Playbook
My Carrier: Rogers

Re: Does MenuDefinition not work in QML yet?

Yeah the inconsistancy of when that problem would occur made it very notorious problem to troubleshoot.  You have to have a menu, an actionbar actionitems, and a Menu.qml (possibly on an import).  Two out of the 3 won't cause the problem.

---
If you find my post helpful please "like" it and "accept as a solution"
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Does MenuDefinition not work in QML yet?

The "possibly on an import" might be the key... I had just put the Menu.qml in the same folder as my main.qml so no import was used. Anyway, your problem's fixed and we've got enough info in this thread for anyone else to quickly identify the cause if they see the same errors, so job done. :-)

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!
Please use plain text.