Can't push to the navigation of a component outside the main.qml pane

Here's some of my main.qml

 Container {
            id: main_content

            attachedObjects: [

                ComponentDefinition {
                    id: listtodo
                    source: "mainList.qml"
                }
            ]

            property variant listtodoObj

            onCreationCompleted: {
                listtodoObj = listtodo.createObject();
                if (!listtodoObj)
                    listtodoObj = listtodo.createObject();

                listtodoObj.dataModel = Model.get();
                main_content.add(listtodoObj);
            }   

        }

I have not included of NavigationPane, but in the hand, I have a pane of navigation with the id "navigationPane.

Here's the part of my mainList.qml:

gestureHandlers: [

                    TapHandler {

                        attachedObjects: ComponentDefinition {
                            id: infoPage;
                            source: "asset:///taskInfo.qml"
                        }

                        onTapped: {

                            var page = infoPage.createObject();

                            navigationPage.push(page);                     

                        }
                    }
                ]

But I can't access navigationPane. In the console it says: "cannot find variable: navigationPage.

What can I do?

This should help:
http://supportforums.BlackBerry.com/T5/native-development-knowledge/how-to-access-QML-properties-fro...

Tags: BlackBerry Developers

Similar Questions

  • I want to use Outlook Web Access for Mac, I don't want to use the light version, I want the full version, but you can't push off the mark. I have firefox 3.6.10

    I want to use Outlook Web Access for Mac (snow leopard 10.6.8), I don't want to use the light version, I want the full version but I can't push off the mark on the light version. I have firefox 3.6.10

    (1) you must update at least Firefox 3.6.24 because there are questions of SECURITY of KNOWN MANY with the version you are using.

    (2) the light version is required on non - IE browsers, except if you are running Exchange Server 2010. With Exchange 2010 they added support for multiple browsers run in the version "no light".

  • How do you get in poppit sprint? I can't get into the main part of the game

    I can't go in the main part of the sprint poppir to play the game

    Hello

    I would try to uninstall then reinstall the game and check if this is useful.

    If the problem is not resolved, you may need to get in touch with support from Pogo to get help.

    Pogo assistance: https://help.ea.com/en/pogo

  • Can't push to the physical device but can push to the Simulator

    Anyone know why I can't push my real BlackBerry but I can push to the Simulator?  I'm just accessing this site on my test pc and pointing to our production server BES.

    http://BES_Server:17080 / push? DESTINATION = MyPin & PORT = 7874 & REQUESTURI = localhost

    I can't transfer blue in the upper right arrows on my device when I send the push. but my application it never receives.  What I put in REQUESTURI how?  If so, what it should be and where I put it in my application?  When I use the MDS assessment locally with the Simulator server, it works fine and sends push them to my fine application of the suggestions would be great!

    I had the reliable port wrong number.  It doesn't seem to matter what I put that in the Simulator, but in the real device it Mater.

  • Separating the main.qml in .qml different files, is more pushed page

    Hi all

    My main.qml became very long (NavigationPane with a Page with a container with a label and ListView and a certain objects attached) and I started to break up.  Before that, when I chose a line in the list, it pushed successfully to the details of the page.  However, when I copy and pasted all within the Page to another qml file that I put in main.qml as object, it is more pushed the detail of the page.  I can't for the life of understand me. I saw / experienced with numerous examples of applications where he worked (Battambang in particular), but cannot see a difference between my folders and those.

    Here are the files, dismembered. When the PillListPage.qml content is copied in main.qml, everything works fine.

    //main.qml// Grid view with detail project template
    import bb.cascades 1.0
    //import bb.platform 1.0
    import bb.system 1.0
    import "stringConcatenation.js" as StringConcatenation
    
    NavigationPane {
        id: navigationPane
    
        //contains time label and grid list view
        firstPage: PillListPage {
        }
    
        onCreationCompleted: {
            // this slot is called when declarative scene is created
    
            // write post creation initialization here
            console.log("NavigationPane - onCreationCompleted()")
    
            // enable layout to adapt to the device rotation
            // don't forget to enable screen rotation in bar-bescriptor.xml (Application->Orientation->Auto-orient)
            OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All;
        }
        onPopTransitionEnded: {
            // Transition is done destroy the Page to free up memory
            page.destroy()
        }
    }
    
    //PillListPage.qmlimport bb.cascades 1.0
    
    Page {
        id: pgMain
    
        content: Container {
            id: rootContainer        verticalAlignment: VerticalAlignment.Center
            horizontalAlignment: HorizontalAlignment.Center
    
            Label {
                id: timeLabel
                text: {
                    var currentTime = Qt.formatDateTime(new Date(), "h:mm AP");
                    return currentTime;
                }
            } //Label
    
            //PillListView
            ListView {
                id: listView
                // set object name to let listView be discoverable from C++
                objectName: "listView"
    
                layout: GridListLayout {
                    verticalCellSpacing: 100
                    cellAspectRatio: 4.0
                    columnCount: 1
                    horizontalCellSpacing: 10.0
                }
    
                listItemComponents: [
                    // define component which will represent list item GUI appearence
                    ListItemComponent {
                        type: "item"
                        // list item GUI appearence component is defined in external MyListItem.qml file
                        MyListItem {
                        }
                    }
                ]
                onTriggered: {
    
                    // When an item is selected we push the detail Page in the chosenItem file attribute.
                    var chosenItem = dataModel.data(indexPath);
    
                    // Create the content page and push it on top to drill down to it.
                    var contentpage = pillDetailPageDefinition.createObject();
    
                    // Set the content properties to reflect the selected image.
                    contentpage.contentImageURL = chosenItem.thumbnail
                    contentpage.contentName = chosenItem.name + ", " + chosenItem.mass
    
                    // Push the content page to the navigation stack
                    navigationPane.push(contentpage);
                }
    
                layoutProperties: StackLayoutProperties {
                    spaceQuota: 1.0
                }
                focusPolicy: FocusPolicy.Default
            } //end of pill list
        } //end root Container
    
        // Attached objects of the Main Content Page
        attachedObjects: [
            ComponentDefinition {
                id: pillDetailPageDefinition
                source: "PillDetailPage.qml"
            } //ComponentDefinition
        ]
    }
    

    Some superfluous code (user interface format stuff) has been removed. I did essentially the same thing with the grid list Basic project template.  Help, please!  My only guess is that perhaps he does not know which is the data model, once he is out of main.qml. Is there something in c ++ I have to do or something I should even in the QML?

    There is no runtime error and the app loaded successfully, with the only problem being that when I click on a list item, there is no response/transition to the details page.

    However, I found a solution of mine.  I pushed my detail view using a function that is called in the onTriggered signal in the list. Copy the following code is a basic example of what I mean I did simply by separating the code of the project template "grid with details view:

    //main.qml
    // Grid view with detail project template
    import bb.cascades 1.0
    
    NavigationPane {
        id: navigationPane
    
        firstPage: MainPageContent {}
    
        attachedObjects: [
            ComponentDefinition {
                id: secondPageDefinition
                source: "DetailPage.qml"
            }
        ]
    
        function setDetailItem(item) {
            // show detail page
            var page = secondPageDefinition.createObject();
            page.text = item.text
            page.image = item.image
            navigationPane.push(page)
        }
        onCreationCompleted: {
            // this slot is called when declarative scene is created
            // write post creation initialization here
            console.log("NavigationPane - onCreationCompleted()")
    
            // enable layout to adapt to the device rotation
            // don't forget to enable screen rotation in bar-bescriptor.xml (Application->Orientation->Auto-orient)
            OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All;
        }
    }
    
    //MainPageContent.qml
    import bb.cascades 1.0
    
    Page {
        id: pgMain
        content: Container {
            ListView {
                id: listView
                // set object name to let listView to be discoverable from C++
                objectName: "listView"
                layout: GridListLayout {
                }
                listItemComponents: [
                    // define component which will represent list item GUI appearence
                    ListItemComponent {
                        type: "item"
                        // list item GUI appearence component is defined in external MyListItem.qml file
                        MyListItem {
                        }
                    }
                ]
                onTriggered: {
                    console.log("selected_index: " + indexPath)
                    var curr_item = dataModel.data(indexPath)
                    // show detail page for selected item
                    setDetailItem(curr_item)
                }
                horizontalAlignment: HorizontalAlignment.Fill
                layoutProperties: StackLayoutProperties {
                    spaceQuota: 1.0
                }
            }
        }
    }
    

    Since I saw your response until after that I had changed my code, I can't test, but it can work.  Thanks for the help!

  • How can I see my most watched Web sites in the main display pane when I open a new tab?

    This used to be what I saw on the main area in front of me, but now I have a thing with MySearchDial forward and I can't change it back. I deleted my dial to the program.
    Thanks for your help.
    Harry

    then also try to run a full scan of your system with security tools like the free version of malwarebytes & adwcleaner.

  • A generated within a loop in a subvi output data can be transferred to the main program for each iteration of the loop?

    Hi LV users,.

    I have a very basic question, I have not succeeded to asnwer using basic considerations.

    I made a sub - vi that performs a scan of current-voltage using a unit of measurement-source Keithley and a loop FOR.

    The subvi outputs 2 tables with my data (essentially an array of voltage and the corresponding current table). I also defined a Terminal at the exit of a group of these 2 tables in order to plot a graph XY - output. Specifically, I indexed this cluster to update after each iteration of the loop FOR, in my sub - vi (the indicator is placed outside the loop, of course).

    My problem is that I want my main program to display the XY-graph in real time, with an update after each iteration of the loop FOR which is in my sub - vi.

    I have a problem because my sub - vi output terminals are available for the main program concluded as soon as the sub - vi has completed its own execution (which is what we expect of sub - vi to do).

    How can I use a sub - vi (because it's handy) and get in the main program in the course of its performance data that are generated from the loops of sub - vi?

    Thanks in advance for your help,

    Yoyo87

    Elements of the queue in the Subvi them put your main VI where you want to display the data and the.

    It is similar to the architecture of producer/consumer. There are examples of it in LabVIEW. The examples work with 2 parallel loops, in your case a loop (the producer) will be in the Subvi.

  • can't get to the main menu with my remote

    Hi guys, someone throws forward? I have a main menu and 3 menus of scenes.  When I hit the "menu" button on my remote, it goes to the menu stage 1.

    I created a certain projects until now and my remote worked well with them.

    But on this project, in every single scene menu, if I hit the top menu, it goes to the menu stage 1.

    I have reviewed my settings and can't seem to find where this fact is somehow indicated on my project. IF I don't reach my "main menu" button it will go to the main menu.

    Thanks for any help! very much appreciated.

    NAVE

    Now, how can I change these?

    Here's my menu with the Routing button:

    Note this button number 6 titled "gravity" is followed by the key #7 "I had my mom.  He is one who WILL not arrow down. So if I'm on "gravity" and "arrow down", it goes to the "funkytown" and refuses to go to "I got from my mom.

    To change this, first select the menu in the project Panel and now in the properties panel, uncheck the "Automatically Route buttons" in the properties of the menu.

    Now in the figure above, you will see that the mouse pointer becomes a hand icon when you hover over any number of the rectangle button number.

    Simply drag the desired number and you're done.

    For example, in your case, to go to the #7 button when you press the #6, go to the reduction in the rectangle of the #6 key and drag and drop it to number 7.

    Then, you'll see that the rectangle button # 6 number 7 instead of the number 8 (which is in the figure right now.)

    Do this for each button.

    Good luck.

    Thank you

    Ramesh.

  • I have a printer installation on a desktop wireless wireless, how the wireless printer can be shared with the main PC

    Windows 7 PC main with modem and router

    PC Windows 7 other connection via WIRELESS and a wireless HP OfficejetPro 8600
    Problem: How to print on the printer without wire of the main PC

    Check the IP address allocated to the printer.

    On the PC, add a new printer in devices and printers, scanning the network for the printer that needs to be automatically detected, confirm with the IP address.

  • Can we push through the BES/MDS to a server outside the company application?

    Hi, we are developing a cloud-based management platform web mobile device for businesses. If the push initiator server would be located on our enterprise network or data centers, and it will not be inside the company of any particular network. In this case, our server in the cloud could still push the unit to a company through their Server BES/MDS?  I guess that the SDM cannot be accessed from outside the company, but somehow I could not a confirmation of research.

    Could someone with experiments to confirm?

    I don't think that this is possible. The BES is the internal network that secures the way BlackBerry.

  • Push all the objects in a tablespace to another

    Hello

    on the 11g R2 (11.2.0.3)

    We need to move all the objects in one tablespace to another.

    Is this possible?

    How can we push all the objects of a logical disk space to a different tablespace?

    Thank you.

    Generate the

    ALTER TABLE TableName MOVE TABLESPACE new_tbsname
    and

    ALTER INDEX REBUILD new_tbsname IndexName

    orders.  You can use "SQL Generation of SQL" or write a PLSQL WHERE USER_SEGMENTS loop.

    If you have some LOBs you must move the LOBs using
    ALTER TABLE TableName MOVE LOB (lobname) STORE AS LOBSEGMENT (TABLESPACE new_tbsname)

    Hemant K Collette

  • Declaring new file c ++ for the new qml file

    I have a qml file, the button I click on function Boutonclique clal

    #include "applicationui.hpp"
    #include "homepage.hpp"
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    using namespace bb::cascades;
    
    AbstractPane *root;
    ApplicationUI::ApplicationUI(bb::cascades::Application *app) :
            QObject(app)
    {
    
        m_pTranslator = new QTranslator(this);
        m_pLocaleHandler = new LocaleHandler(this);
    
        bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()));
    
        Q_ASSERT(res);
        Q_UNUSED(res);
        onSystemLanguageChanged();
    
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        // Create root object for the UI
        root = qml->createRootObject();
        if (!qml->hasErrors()) {
    
                qml->setContextProperty("quoteApp", this);
            }
        // Set created root object as the application scene
        app->setScene(root);
    }
    
    void ApplicationUI::onSystemLanguageChanged()
    {
        QCoreApplication::instance()->removeTranslator(m_pTranslator);
        // Initiate, load and install the application translation files.
        QString locale_string = QLocale().name();
        QString file_name = QString("Test1_%1").arg(locale_string);
        if (m_pTranslator->load(file_name, "app/native/qm")) {
            QCoreApplication::instance()->installTranslator(m_pTranslator);
        }
    }
    void ApplicationUI::clickedButton()
    {
    HomePage home = new HomePage(this);
    
    }
    

    Homepage.cpp

    #include "homepage.hpp"
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    using namespace bb::cascades;
    
    HomePage::HomePage(bb::cascades::Application *app):
                    QObject(app) {
    
            m_pTranslator = new QTranslator(this);
            m_pLocaleHandler = new LocaleHandler(this);
    
            bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()));
    
            Q_ASSERT(res);
            Q_UNUSED(res);
            onSystemLanguageChanged();
                QmlDocument *qml = QmlDocument::create("asset:///homepage.qml").parent(this);
                NavigationPane *myNavi = root->findChild("myNavi");
                if (myNavi == NULL){
                    qDebug() << "Unable find NavigationPane";
                    return;
                }
                Page *new_page = qml->createRootObject();
                if (new_page){
                    myNavi->push(new_page);
                }else{
                    return;
                }
                Application::instance()->setScene(myNavi);
    }
    
    void HomePage::onSystemLanguageChanged()
    {
        QCoreApplication::instance()->removeTranslator(m_pTranslator);
        // Initiate, load and install the application translation files.
        QString locale_string = QLocale().name();
        QString file_name = QString("Test1_%1").arg(locale_string);
        if (m_pTranslator->load(file_name, "app/native/qm")) {
            QCoreApplication::instance()->installTranslator(m_pTranslator);
        }
    }
    

    Homepage. HPP

    #ifndef HOMEPAGE_H_
    #define HOMEPAGE_H_
    
    #include 
    
    namespace bb
    {
        namespace cascades
        {
            class Application;
            class LocaleHandler;
        }
    }
    
    class QTranslator;
    
    /*!
     * @brief Application object
     *
     *
     */
    
    class HomePage : public QObject
    {
        Q_OBJECT
    public:
        HomePage(bb::cascades::Application *app);
        virtual ~HomePage() { }
        Q_INVOKABLE void clickedButton();
    private slots:
        void onSystemLanguageChanged();
    private:
        QTranslator* m_pTranslator;
        bb::cascades::LocaleHandler* m_pLocaleHandler;
    };
    
    #endif /* ApplicationUI_HPP_ */
    

    I get in homepage.cpp root is not declared in this scope. I want to click on the main.qml button, I go to new file c ++ and call homepage.qml

    Hello
    I highly recommend investing a few weeks in learning C++ before learning the stunts. Specifically, these topics:
    -Advance declaring types
    -Memory management
    -Classes & inheritance (different from Java, a lot)
    -Life management object qt (parent/child, order of destruction of object relationship)

    These are essential, but we can't really help with them in the form of forum.

    On the compile error, this should probably fix:

    Homepage * home = new HomePage (NULL);

    But there are other problems in the statement of homepage. It's the manufacturer probably shouldn't take an instance of class ApplicationUI as the parameter.

  • How to display on the main façade of the progression of each sub Vi?

    my program has many void screws, I want to show in the main façade of the status of each sub Vi; What is the best way to do it?

    at least I need to show that each sub vi is complete, [I can add details about the main panelsuch before: name of the file which is read by a sub - VI, graphics drawn by a Subvi, etc...]

    can I view a graph of a Subvi on the face before of the main Vi?

     

    what I did HV is attached as an image.

    follow the example... from your example: looks like your explicit property node wants to a stream of data (LDM)

  • Can I use "If", "else" statement in main.qml?

    Hello

    What statement I use within the main.qml?

    is there documentation for things and the statement can be used within the mian.qml (e.g. 'if', 'for', 'while')

    Hello

    Engine QML use a JavaScript interpreter.

    that statement is bug in Qt 4.8, so it is better to avoid it or explicit use of braces {} in the case branches. Other than that, it is simply JavaScript.

    Syntax information QML is located on the Web site of the project-qt:

    http://Qt-project.org/doc/Qt-4.8/qdeclarativeintroduction.html

    I suggest you browse the other articles there as well.

  • Windows 7 Internet on the main office/main screen being blocked please help

    For some reason any Windows 7 does not allow programs download from the internet. Programs (Adobe Digital & OverDrive Media are the two main) used to be able to download, but they no longer work. I've placed on the green list to come through the fire wall and I'm not running on a proxy server. I'm at a loss as to why he worked for years and now he's no longer. I tried the two patches that were given for both programs and nothing has worked. For Overdrive Media I get the answer that it is not connected to the internet and to digital Adobe, I get a different error that I looked and it said that the program could not through the firewall, changed cela setting and still have the same error. I also used to get the tab accu-weather on the top of the scree, but now he tells me that I am not connected to the internet. But clearly, I am as I am typing this question. Even gadgets that provides windows that can be placed on the main screen, like a clock and weather report that they are unable to connect to the server, that's why I think that it is not the firewall that is causing this problem I tried to disable the firewall and Windows program and I still have the same question. We did not have any changes made to our Web server or provider and the internet seems to work fine as well. I have also just finished a computer virus scan to determine if there is a problem here and nothing came. I tried to unplug the router to reset my IP address and that did not help. Any suggestion would be great.
    Thanks in advance for any help
    See you soon
    Janine
    Oh also note, my utorrent program does not seem to have any get what throughoh transmitter and the main provider of internet if I use Firefox.

    Hello

    A lot of programs in a Windows 7 computer that depends on the connection to the internet are controlled by settings of Internet connection in the computer. We can access these settings by going to Internet Options of Internet Explorer.

    You can check if your Internet Explorer is set to work offline?

    You can check that by following these steps:

    1. open Internet Explorer.

    2. Once Internet Explorer is open, press Alt and F together on your keyboard keys.

    3. make sure that the work offline option is not selected in the drop-down menu that appears.

    If your problem is still there, you can check these settings once:

    1. press the Windows and R keys on your keyboard to open the run box.

    2. in the run box, type inetcpl.cpl and press enter on your keyboard. This should open the Internet Properties dialog box.

    3. click on the connections tab.

    4. then click on LAN settings.

    5. make sure, none of these options in the local network settings are selected. If none of these three options have been selected, please deselect the and click OK.

    Now please check whether or not your gadgets and other programs that had the issue work.

    I hope this information helps you. Please respond with the status of the issue so that we can help you further.

Maybe you are looking for

  • Is it possible to go through Satellite C875 - 15G to Win10?

    Is it possible to upgrade a C875 - 15G of Win10? Currently it is not on the list cell phones supported on the Toshiba site, but Win10 compatibility check encounter any problems.Does anyone tried to upgrade such a laptop already?

  • Decommissioning of Win8 to envy 17-j021nr Win7 drivers needed

    I have a client who runs a software who dislikes win8 so I'm downgrading his new envy17 to win7.  I managed to get all the other drivers installed and running, but it doesn't seem to matter that I try to download other additional drivers models I can

  • Repeater

    like to connect a router WRT 54 GS to WRTU 54 G router with cable about 70 feet apart and use it as a Repeater or extension, so I can get a better signal on the other side of my house that will work. and what do I do to program.

  • With the help of the cacades c ++

    Is it possible to compile third-party C++ classes and use them in a bb10 cascades project or they all should be rewriting for QT? I tried to include a library c ++ open source third party but the files will be not compile. This requires compile nativ

  • Why my programs are stopping on their own

    I just upgraded from XP to windows 7 Home premium 6-bit (something I was lothe to do first)Since Monday that didn't have any other problems, Ive reformatted twice already and its really me off ticking, my computer was basically unusable for the last