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:
@@ -29,7 +29,7 @@ textView.style.fontSize = 8;
|
||||
export function createPage() {
|
||||
var button = new bm.Button();
|
||||
button.text = "Run Tests";
|
||||
button.on(bm.knownEvents.tap, function () {
|
||||
button.on(bm.Button.tapEvent, function () {
|
||||
tests.runAll();
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ export function createPage() {
|
||||
|
||||
var button = new buttonModule.Button();
|
||||
button.text = "Test";
|
||||
button.on(buttonModule.knownEvents.tap, function () {
|
||||
button.on(buttonModule.Button.tapEvent, function () {
|
||||
var topFrame = frame.topmost();
|
||||
topFrame.goBack();
|
||||
});
|
||||
|
||||
@@ -14,10 +14,10 @@ export function createPage() {
|
||||
|
||||
var listView = new listViewDef.ListView();
|
||||
|
||||
listView.on(listViewDef.knownEvents.itemLoading, (args: listViewDef.ItemEventData) => {
|
||||
listView.on(listViewDef.ListView.itemLoadingEvent, (args: listViewDef.ItemEventData) => {
|
||||
var btn = <bm.Button> args.view;
|
||||
if (btn) {
|
||||
btn.off(bm.knownEvents.tap);
|
||||
btn.off(bm.Button.tapEvent);
|
||||
}
|
||||
else {
|
||||
btn = new bm.Button();
|
||||
@@ -26,13 +26,13 @@ export function createPage() {
|
||||
|
||||
if (!data[args.index]) {
|
||||
btn.text = "Run all";
|
||||
btn.on(bm.knownEvents.tap, function () {
|
||||
btn.on(bm.Button.tapEvent, function () {
|
||||
tests.runAll();
|
||||
});
|
||||
} else {
|
||||
var testModule = data[args.index];
|
||||
btn.text = testModule;
|
||||
btn.on(bm.knownEvents.tap, function () {
|
||||
btn.on(bm.Button.tapEvent, function () {
|
||||
tests.runAll(testModule);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user