mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Replace knownEvents modules with static strings.
This commit is contained in:
@@ -15,7 +15,7 @@ export function createPage() {
|
||||
|
||||
var btn = new button.Button();
|
||||
btn.text = "Run";
|
||||
btn.on(button.knownEvents.tap, function () {
|
||||
btn.on(button.Button.tapEvent, function () {
|
||||
var pagePath = basePath + txtInput.text;
|
||||
var fileName = fs.path.join(__dirname, "pages", txtInput.text);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export function createPage() {
|
||||
rotaionLabel.text = "Rotate here";
|
||||
stack.addChild(rotaionLabel);
|
||||
|
||||
stopButton.on(button.knownEvents.tap, function () {
|
||||
stopButton.on(button.Button.tapEvent, function () {
|
||||
observer1.disconnect();
|
||||
observer2.disconnect();
|
||||
observer3.disconnect();
|
||||
|
||||
@@ -8,7 +8,7 @@ export function createPage() {
|
||||
|
||||
var btn = new button.Button();
|
||||
btn.text = "Alert";
|
||||
btn.on(button.knownEvents.tap, function () {
|
||||
btn.on(button.Button.tapEvent, function () {
|
||||
alert("Alert is global");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user