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: 34
Registered: ‎05-13-2014
My Device: Blackberry Developer
My Carrier: non

Not supporting CustomControl

Hi friends,

     I want to custom some controls. So I have refer this site: https://developer.blackberry.com/native/reference/cascades/bb__cascades__customcontrol.html. But when I add "import custom.control.lib 1.0" this line in my QML file, it is not supported and shows "Unknown library custom.control.lib" this popup. I am using Momentics IDE 2.0 which is downloaded from Blackberry's official web site for developers. So what is the problem that I can not find out. Do you have any idea? Please help me.

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Not supporting CustomControl

you write custom controls in c++, then use them in qml.
you can't just import a lib
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Not supporting CustomControl

Just to back up Gonish a little the documentation actually defines QML files that contain a control rather than a page as custom controls in QML as well so it is easy to get confused.  For QML custom controls just define the control in a different QML file no library inclusion is neccesary.

 

However Simon is right and for CustomControl you will need to work in C++.

 

This tutorial may be helpful for a better understanding...

 

http://developer.blackberry.com/native/documentation/cascades/dev/integrating_cpp_qml/custom_control...


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.