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

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
Please use plain text.
Developer
tanphat1412
Posts: 125
Registered: ‎11-06-2012
My Device: BlackBerry

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.

 

Please use plain text.
Super Contributor
lyon819
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.

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

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