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: 30
Registered: ‎11-09-2012
My Device: Dev Alpha A
My Carrier: Airtel
Accepted Solution

Beginner Question - Sheet opens only once when opened via application bar

I have a very simply Sheet component defined in my main.qml like this

 

        Sheet {
            id: mainPageSheet
            content: Page {
                Button {
                    text: "Close Sheet"
                    onClicked: { mainPageSheet.close() }
                }
            }
        }

 

I open it from application bar using settingsActionItem

    Menu.definition: MenuDefinition {
        settingsAction: SettingsActionItem {
            title: qsTr("Settings")
             
            onTriggered: {
                //mainPageSheet.setContent(settingsSheetComp.createObject());
                mainPageSheet.open()
            }
        }

}

 

Now my issue is it opens only once, next time it shows nothing and swipe gesture to bring down application bar also stops responding. since I am not doing much I am bit stumped what's going wrong here

 

I am using the simulator on Gold SDK

Contributor
Posts: 16
Registered: ‎04-05-2009
My Device: Bold 9930, PlayBook, and Dev Alpha
My Carrier: Verizon Wireless

Re: Beginner Question - Sheet opens only once when opened via application bar

This is a bug I (and others) have noticed too. So, you're probably not doing anything wrong Smiley Happy Hopefully we will get a fix soon.

Developer
Posts: 87
Registered: ‎07-23-2009
My Device: Z30
My Carrier: XL

Re: Beginner Question - Sheet opens only once when opened via application bar

yup, it is bug and it also happen on my app; so I change setting sheet invoked from actionbar rather than menu actionbar (top bar)

Developer
Posts: 30
Registered: ‎11-09-2012
My Device: Dev Alpha A
My Carrier: Airtel

Re: Beginner Question - Sheet opens only once when opened via application bar

Thanks for all replies. somehow Gold SDK has been more unstable compared to earlier builds in areas that at least affect me. hopefully wont hit any showstoppers
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Beginner Question - Sheet opens only once when opened via application bar

As a temporary workaround, recreate the sheet each time it's shown:

 

void MyApplication::settingsAction_triggered()
{
	Sheet *sheet = Sheet::create()
			.content(new SettingsPage)
			.onClosed(this, SLOT(settingsSheet_closed()));
	sheet->open();
}

 


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: Beginner Question - Sheet opens only once when opened via application bar

I got info that this bug is fixed with next OS Update on devAlpha Smiley Happy

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

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 30
Registered: ‎11-09-2012
My Device: Dev Alpha A
My Carrier: Airtel

Re: Beginner Question - Sheet opens only once when opened via application bar

Fixed in today's Simulator update