Skip to content

Commit dcd7dbe

Browse files
cpetrovChristian Petrov
authored and
Christian Petrov
committed
Fix example page titles on iOS
Static page class getter 'name' was colliding with the function property 'name'. On Android, the static class getter overwrote the function property, but on iOS it didn't, which resulted in the class constructor name instead of the given page name being displayed. Use capital case for the property to designate it as static and thus prevent collision with the function property 'name'. Change-Id: I1943e9e32f6dfd2bfbf2eb28fb45adff6e8d8551
1 parent 10d97b7 commit dcd7dbe

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

example/src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PAGES.forEach(createPageButton);
1717
function createPageButton(PageConstructor) {
1818
new Button({
1919
left: 16, top: 'prev() 16', right: 16,
20-
text: 'Show \'' + PageConstructor.name.toLowerCase() + '\' example'
20+
text: 'Show \'' + PageConstructor.NAME.toLowerCase() + '\' example'
2121
}).on('select', () => new PageConstructor().appendTo(navigationView))
2222
.appendTo(mainPage);
2323
}

example/src/pages/CameraPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const {Button, Composite, Page, TextView} = require('tabris');
33
class CameraPage extends Page {
44

55
constructor() {
6-
super({title: CameraPage.name});
6+
super({title: CameraPage.NAME});
77
this._createUI();
88
}
99

10-
static get name() {
10+
static get NAME() {
1111
return 'Camera';
1212
}
1313

example/src/pages/MarkerPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const {Composite, Page, TextView} = require('tabris');
33
class MarkerPage extends Page {
44

55
constructor() {
6-
super({title: MarkerPage.name});
6+
super({title: MarkerPage.NAME});
77
this._createUI();
88
}
99

10-
static get name() {
10+
static get NAME() {
1111
return 'Marker';
1212
}
1313

example/src/pages/PositionPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const {Button, Composite, Page, TextView} = require('tabris');
33
class PositionPage extends Page {
44

55
constructor() {
6-
super({title: PositionPage.name});
6+
super({title: PositionPage.NAME});
77
this._createUI();
88
}
99

10-
static get name() {
10+
static get NAME() {
1111
return 'Position';
1212
}
1313

example/src/pages/RegionPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const {Button, Composite, Page, TextView} = require('tabris');
33
class RegionPage extends Page {
44

55
constructor() {
6-
super({title: RegionPage.name});
6+
super({title: RegionPage.NAME});
77
this._createUI();
88
}
99

10-
static get name() {
10+
static get NAME() {
1111
return 'Region';
1212
}
1313

0 commit comments

Comments
 (0)