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

New Contributor
Posts: 4
Registered: ‎07-14-2013
My Device: Blackberry q10. Blackberry developer
My Carrier: Airtel

How to convert bb.cascades code 1.2 to bb.cascades 1.0?


For example i have a code which is in cascades 1.2 which i need it in cascades 1.0 format 




import bb.cascades 1.2


TitleBar {
id: newsTitleBar
property alias newsTitle: titleLabel.text
property int layoutHeight: 0
property int layoutWidth: 0

kind: TitleBarKind.FreeForm

kindProperties: FreeFormTitleBarKindProperties {
Container {
leftPadding: 25

background: titlePaint.imagePaint
attachedObjects: [
ImagePaintDefinition {
id: titlePaint
imageSource: "asset:///images/title.png"
LayoutUpdateHandler {
id: layoutHandler
onLayoutFrameChanged: {

newsTitleBar.layoutHeight = layoutFrame.height;
newsTitleBar.layoutWidth = layoutFrame.width;

layout: StackLayout {
orientation: LayoutOrientation.LeftToRight

Label {
id: titleLabel
verticalAlignment: VerticalAlignment.Center

textStyle {
color: Color.create("#ffffff")
base: SystemDefaults.TextStyles.TitleText
fontWeight: FontWeight.W500

layoutProperties: StackLayoutProperties {
spaceQuota: 1




Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: How to convert bb.cascades code 1.2 to bb.cascades 1.0?

You could try by just changing the import at the top, but there might be an incompatibility. There is no automatic way, but if you want backwards compatibility it is easier to start from 1.0 and go to 1.2 than vice versa.

BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: How to convert bb.cascades code 1.2 to bb.cascades 1.0?

I'm using Git Branches to manage projects supporting more then one API Level


have written a blog on this:



ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner