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
Contributor
ejup2009
Posts: 20
Registered: ‎05-18-2010
My Device: BOLD 9900
Accepted Solution

CODE "NavigationPane.deprecatedPushQmlByString("QMLFile.qml")" FAIL

Hey Everyone,

 

Im creating the menu system for my app. 

 

NavigationPane{} with multiple pages.

 

NavigationPane {
    id: navigationPane
    Page {
        Container {
            background: Color.Black
            layout: AbsoluteLayout {
            }
            ImageView {
                id: imageViewID
                imageSource: "asset:///images/LogoNewsChannel.png"
                scalingMethod: ScalingMethod.Fill
                translationX: 210.0
                translationY: 250.0
                scaleX: 2.0
                scaleY: 2.0
            }
            Label {
                text: "News Channel_BB10"
                translationX: 220.0
                translationY: 40.0
                scaleX: 1.5
                scaleY: 1.5
                textStyle {
                    base: SystemDefaults.TextStyles.BigText
                    fontWeight: FontWeight.Bold
                    color: Color.Yellow
                }
            }
            Button {
                id: button1
                text: "Noticias"
                imageSource: "asset:///images/LogoNewsChannel.png"
                layoutProperties: AbsoluteLayoutProperties {
                    positionX: 10
                    positionY: 800
                }
                onClicked: {
                    navigationPane.deprecatedPushQmlByString("noticias.qml");
                }
            }

 this maim.qml call others pages to make the action but when i push the bottom "notice" for example,  the aplication doesn`t make anything. i had read that these code NavigationPane.deprecatedPushQmlByString("QMLFile.qml") had been removed.

 

i`ve tried with navigationPane.push(QMLFile.qml); but any 

 

How can I do to invoke or call the page beacuase the aplication open but only execute main page 

 

 

 

 

 

thanks

Enviado de mi BlackBerry Bold 9900

Ejup2009_Dev
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: CODE "NavigationPane.deprecatedPushQmlByString("QMLFile.qml")" FAIL

Everyone should read the Upgrading to beta 3 page where they've explained how to deal with this situation and many others. It's required reading, given how many changes and improvements there are.


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!
Developer
marcossit
Posts: 176
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C

Re: CODE "NavigationPane.deprecatedPushQmlByString("QMLFile.qml")" FAIL

Here's your answer reads as integrating them here https://developer.blackberry.com/cascades/documentation/dev/upgrading/navigationchanges.html

 

Before

 

Button {
                id: button1
                text: "Noticias"
                imageSource: "asset:///images/LogoNewsChannel.png"
                layoutProperties: AbsoluteLayoutProperties {
                    positionX: 10
                    positionY: 800
                }
                onClicked: {
                    navigationPane.deprecatedPushQmlByString("noticias.qml");
                }
            }

 

After



 

            Button {
                id: button1
                text: "Noticias"
                imageSource: "asset:///images/LogoNewsChannel.png"
                layoutProperties: AbsoluteLayoutProperties {
                    positionX: 10
                    positionY: 800
                }
            onClicked: {
            var page = pageDefinition5.createObject();
                  navigationPane.push(page);
                  }
                 attachedObjects: ComponentDefinition {
                 id: pageDefinition5;
                 source: "noticias.qml"
                   }

 something, check if you work more or less


Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Contributor
ejup2009
Posts: 20
Registered: ‎05-18-2010
My Device: BOLD 9900

Re: CODE "NavigationPane.deprecatedPushQmlByString("QMLFile.qml")" FAIL

I follow the instruction 

 

Button {
                id: button1
                text: "Noticias"
                imageSource: "asset:///images/LogoNewsChannel.png"
                layoutProperties: AbsoluteLayoutProperties {
                    positionX: 10
                    positionY: 800
                }
            onClicked: {
            var page = pageDefinition5.createObject();
                  navigationPane.push(page);
                  }
                 attachedObjects: ComponentDefinition {
                 id: pageDefinition5;
                 source: "noticias.qml"
                   }

 but doesnt make anything if somebody has other form ... i continue within invoke the page of the main.qml

Enviado de mi BlackBerry Bold 9900

Ejup2009_Dev
Contributor
ejup2009
Posts: 20
Registered: ‎05-18-2010
My Device: BOLD 9900

Re: CODE "NavigationPane.deprecatedPushQmlByString("QMLFile.qml")" FAIL

I continue presenting this problem .. anybody has a solution using this code how can i do to invoke other page.qml on a click

Enviado de mi BlackBerry Bold 9900

Ejup2009_Dev