×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    26

    Question Result of expression 'pageStack.push' [undefined] is not a function

    Hi !

    I am trying in QML to load a Page in my PageStackWindow.

    Here is my QML code :

    Code:
    import QtQuick 1.0
    import com.nokia.meego 1.0
    
    
    PageStackWindow{
        id: pageStack
    
        Component.onCompleted: {
                 pageStack.push(Qt.resolvedUrl("mapPage.qml"))
             }
    }
    It is working great in the Simulator or in DesktopMode. But when I deploy it in Meego, I get an error


    qrc:qml/qml/main.qml:9: TypeError: Result of expression 'pageStack.push' [undefined] is not a function.

    What am I missing ?

    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2011
    Posts
    26

    Re: Result of expression 'pageStack.push' [undefined] is not a function

    Solved it. Iw as missing the PageStack element. But now, I have a black screen on Meego. But it still works great on Simulator...

    UPDATE : Same as one of my previous subject here. Using pre-built QMLApplicationViewer by QtCreator doesn't work but using a simple QDeclarativeView instead works... Any idea why ?
    Last edited by guillaume.lachaud; 2011-10-28 at 14:22.

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    93

    Re: Result of expression 'pageStack.push' [undefined] is not a function

    Quote Originally Posted by guillaume.lachaud View Post
    Hi !

    I am trying in QML to load a Page in my PageStackWindow.

    Here is my QML code :

    Code:
    import QtQuick 1.0
    import com.nokia.meego 1.0
    
    
    PageStackWindow{
        id: pageStack
    
        Component.onCompleted: {
                 pageStack.push(Qt.resolvedUrl("mapPage.qml"))
             }
    }
    It is working great in the Simulator or in DesktopMode. But when I deploy it in Meego, I get an error


    qrc:qml/qml/main.qml:9: TypeError: Result of expression 'pageStack.push' [undefined] is not a function.

    What am I missing ?

    Thanks

    Code:
    import QtQuick 1.0
    import com.nokia.meego 1.0
    
    
    PageStackWindow{
        id: pageStack
    
        Component.onCompleted: {
                 var component = Qt.createComponent(Qt.resolvedUrl("mapPage.qml"));
                 if (component.status == Component.Ready) 
                 {
                     var object = component.createObject(pageStack);
                     pageStack.push(object)
                 }
             }
    }

Similar Threads

  1. undefined SetUserInfo function
    By amit.mangal in forum Symbian
    Replies: 8
    Last Post: 2009-10-01, 11:10
  2. Replies: 3
    Last Post: 2007-10-29, 07:27
  3. floor() function returns invalid result
    By ravey72 in forum Symbian
    Replies: 5
    Last Post: 2007-04-26, 11:22
  4. floor() function returns invalid result
    By ravey72 in forum Open C/C++
    Replies: 4
    Last Post: 2007-04-20, 17:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×