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
Super Contributor
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

How to make onClick button work on BB 10 simulator??

Purpose:

Click a button to show a local html file

 

Problem:

The onClick function des not work.

 

Code:

NavigationPane {
id: navigationPane
Page {
Button {
id: test123
onClicked: {
//navigationPane.deprecatedPushQmlByString("blog.qml");
//navigationPane.deprecatedPushQmlByString("WMMShtml.qml");
navigationPane.deprecatedPushQmlByString("asset:///WMMShtml.qml")
}
text: "Test"
}
}
}

 

Does anyone know how to make click function work on BB 10 simulator??

 

Thanks your attention,

 

-Fight with BB10
Developer
Posts: 132
Registered: ‎11-06-2012
My Device: BlackBerry Passport

Re: How to make onClick button work on BB 10 simulator??

You need a Web View to view the HTML.

See https://developer.blackberry.com/cascades/documentation/ui/webview/loadinghtml.html for more detail.

 

Super Contributor
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

Re: How to make onClick button work on BB 10 simulator??

Fortunately, I found a bug in BB 10.

 

So far, webview does not work on BB 10 Simulator.

http://supportforums.blackberry.com/t5/Native-Development/Cascades-WebView-Control/m-p/1709267#M3692

 

Cheers.

 

 

-Fight with BB10
Highlighted
Super Contributor
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

Re: How to make onClick button work on BB 10 simulator??

There are an issue to suffer button click with a dialog.
 
1.Cascades SDK, sometime need to edit LIBS parameter in .pro file.
LIBS += -lbbsystem
::LIBS += -lbbdevice
 
If you want to develop button click with a dialog.
One reference:
Find Cascades samples/dialog.
 
 
-Fight with BB10