Created
November 8, 2012 15:57
-
-
Save ryugoo/4039687 to your computer and use it in GitHub Desktop.
マルチコンテキストでウィンドウを開く
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do -> | |
| # Main window | |
| win = Ti.UI.createWindow | |
| url: "win1.js" | |
| # Tab | |
| tab = Ti.UI.createTab | |
| title: "Apps" | |
| icon: "KS_nav_ui.png" | |
| window: win | |
| tabGroup = Ti.UI.createTabGroup() | |
| tabGroup.addTab tab | |
| tabGroup.open() | |
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Current window | |
| win = Ti.UI.currentWindow | |
| win.backgroundColor = "#FFFFFF" | |
| win.title = "Window 1" | |
| # Label | |
| label = Ti.UI.createLabel | |
| text: "Click here (Open Window 2)." | |
| label.addEventListener "click", -> | |
| Ti.UI.currentTab.open Ti.UI.createWindow | |
| url: "win2.js" | |
| win.add label |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Current window | |
| win = Ti.UI.currentWindow | |
| win.backgroundColor = "#DDDDDD" | |
| win.title = "Window 2" | |
| # Label | |
| label = Ti.UI.createLabel | |
| text: "Click here (Open Window 3)." | |
| label.addEventListener "click", -> | |
| Ti.UI.currentTab.open Ti.UI.createWindow | |
| url: "win3.js" | |
| win.add label |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Current window | |
| win = Ti.UI.currentWindow | |
| win.backgroundColor = "#BBBBBB" | |
| win.title = "Window 3" | |
| # Label | |
| label = Ti.UI.createLabel | |
| text: "Click here (Open Window 1)." | |
| label.addEventListener "click", -> | |
| Ti.UI.currentTab.open Ti.UI.createWindow | |
| url: "win1.js" | |
| win.add label |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment