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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
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 

 

Code:

 

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
}
}

}
}
}

 

 

Developer
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!
Developer
Posts: 1,750
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV, DTEK
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:

https://ekkescorner.wordpress.com/2013/07/11/mobile-development-git-helps-to-manage-apps-for-differe...

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

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

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