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
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain
Accepted Solution

NavigationPane malfunction

[ Edited ]

Hi guys !

 

NavigationPane has very annoying issue. Example code from documentation page , section "Defining screens as attached objects"

 

import bb.cascades 1.0
 
NavigationPane {
    id: navigationPane
    Page {
        content: Container {
            Button {
                text: "Display first Page"
                 
                onClicked: {
                    navigationPane.push (firstPage);
                }
            }
             
            Button {
                text: "Display second Page"
                 
                onClicked: {
                    navigationPane.push (secondPage);
                }
            }
        } // end of Container
    } // end of Page
     
    attachedObjects: [
        Page {
            id: firstPage
            content: Container {
                Label {
                    text: "First attachedObjects Page"
                }
            }
             
            // Override the default back button to just pop the current
            // screen off of the stack, instead of pop and delete
            paneProperties: NavigationPaneProperties {
                backButton: ActionItem {
                    onTriggered: {
                        navigationPane.pop ();
                    }
                }
            }
        },
        Page {
            id: secondPage
            content: Container {
                Label {
                    text: "Second attachedObjects Page"
                }
            }
             
            // Override the default back button to just pop the current
            // screen off of the stack, instead of pop and delete
            paneProperties: NavigationPaneProperties {
                backButton: ActionItem {
                    onTriggered: {
                        navigationPane.pop ();
                    }
                }
            }
        } // end of Page
    ] // end of attachedObjects list
} // end of NavigationPane

 

 

This shows  2 buttons: one form display the first Page, and other for display second page.

 

When you click on button for display first page, the page is displayed, OK. 

 

But if you click again in the same button, page is not displayed !!! Only occurs at Beta 2.

 

Tested with Dev Alpha Device.

 

push( ) or pop ( ) bug ?

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: NavigationPane malfunction

Any idea? 

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: NavigationPane malfunction

Help me, please. 

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Highlighted
Developer
Posts: 224
Registered: ‎03-29-2012
My Device: 9900
My Carrier: Wind

Re: NavigationPane malfunction

hmm, I define the back button outside of the pages just in the navigation pane like:

 

 

NavigationPane {
    signal resetPage()
    id: homeNav
    paneProperties: NavigationPaneProperties {
                      backButton: ActionItem {
                          title: "Return"
                          onTriggered: {
                        homeNav.pop();
                           
                          }
                  }
        
          }

 And mine works fine, maybe a bug with your method?

Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: NavigationPane malfunction

[ Edited ]

I have changed back button definition. The same result ... very very strange.

 

When i tap back button, this message error shows in console :

 

-------------------------------------------------------------------

Context: Failed to find target node with id  0

--------------------------------------------------------------------

 

I view this messages in console at start of app too :

----------------------------------

ERROR:: QNXPpsSubscriptionServer: QNXPpsSubscriptionServer::createObject: (13) Failed to create dir /pps/services/automation/framework

ERROR:: QNXPpsSubscriptionServer: QNXPpsSubscriptionServer::subscribe: Failed to open /pps/services/automation/framework/control?delta,notify=431:00000001
----------------------------------

 

In release notes, "Known Issues" shows this :

----------------------------------------------------------------------

When a Page is popped off of a NavigationPane using the pop() function, the Page is sometimes deleted by the garbage collector. The pop() function incorrectly sets the parent of the Page to NULL, which makes it a viable candidate for destruction by the garbage collector. This issue also occurs when garbage collection is triggered manually.
Workaround: Use the depracated push() function instead.

-----------------------------------------------------------------------

https://developer.blackberry.com/cascades/download/releasenotes/

 

Perhaps pop() destroying content or attachedObjects malfunction ??  I don't know.

 

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 224
Registered: ‎03-29-2012
My Device: 9900
My Carrier: Wind

Re: NavigationPane malfunction

Very interesting, I do use deprecated push, while the alternative push caused me similar problems in beta 1, I did not know there was a lingering issue. 

Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: NavigationPane malfunction

[ Edited ]

It's work with deprecated push, but I would like some guy from blackberry would confirm this issue.

 

I think do use Sheet instead until this annoying bug fixes.

 

Thanks, vingilot! 

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Retired
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: NavigationPane malfunction

A general question: Are you able to properly run the Navigation Pane example from the Beta 2 templates?

 

Martin

 

Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: NavigationPane malfunction

[ Edited ]

Yes.  deprecatedPushQmlByString() method works well.

 

The problem is when i use push() method ( through attachedObjects )

 

If you run code at my first post message, you will view the problem : Tap "Display first Page" button, "Back" and tap "Display first Page" again. 

 

NavigationPane only works once, not twice.

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook
Developer
Posts: 146
Registered: ‎05-18-2012
My Device: PlayBook & STL100-1 LE Z10 & Dev Alpha C
My Carrier: Telefonica Spain

Re: NavigationPane malfunction

I'm not alone...

 

http://supportforums.blackberry.com/t5/Cascades-Development/NavigationPane-second-push-freezes-and-c...

---------------------------------------------------------------
Leandro Cerdan - Duantox Apps
BlackBerry Elite dev
TapyHold, Built for Blackberry multimedia scrapbook