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
New Contributor
fmunozs
Posts: 5
Registered: ‎01-09-2013
My Device: BB10 Alpha B
My Carrier: Uff
Accepted Solution

Problem with MenuDefinition and Sheet

I'm having a problem with Menu and Sheets, if I use the Menu to open the Sheet more than two times the sheet is not opened and the Menu will not reappear. If I use the button in the page it works as expected.
import bb.cascades 1.0

Page {
    Menu.definition: MenuDefinition {
        settingsAction: SettingsActionItem {
            onTriggered : {
                settingsSheet.open();
            }
        }
    }
    attachedObjects: [
        Sheet {
            id: settingsSheet
            content: Page {
                Button {
                    text: "Close"
                    onClicked: {
                        settingsSheet.close()
                    }
                }
            }
        }
    ]
    
    Container {
        layout: DockLayout {}
        Button {
            text: qsTr("Open")
            onClicked: settingsSheet.open();
        
        }
    }
}

 

Please use plain text.
Developer
ekke
Posts: 1,447
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Problem with MenuDefinition and Sheet

please search on the threads in this forum - there are many threads covering this problem with gold sdk

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

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Problem with MenuDefinition and Sheet

Just heard that this is a known issue that's fixed in the next update, which I also just heard is expected by Friday-ish (both a device firmware and an SDK update).

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!
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Problem with MenuDefinition and Sheet

For reference:
https://www.blackberry.com/jira/browse/BBTEN-452

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Developer
ekke
Posts: 1,447
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Problem with MenuDefinition and Sheet

yes it is fixed - one of the reasons why I'm waiting for the next OS update ;-)

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

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Problem with MenuDefinition and Sheet

Simple but hackish workaround posted here for the short term: http://supportforums.blackberry.com/t5/Cascades-Development/Application-menu-unavailable-twice-after...

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!
Please use plain text.