Replace knownEvents modules with static strings.

This commit is contained in:
Nedyalko Nikolov
2015-04-23 15:47:56 +03:00
parent 8023390692
commit 95ca8d9c8c
101 changed files with 520 additions and 471 deletions

View File

@@ -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();
});

View File

@@ -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();
});

View File

@@ -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);
});
}