To save our HelloWorld and trigger the sample on startup time evaluate (doIt) the following expression in Workspace:
('U8Toolbar open', $!, String cr, String cr),
(Exporter new fileOutCategory: #TestingUI8),
('HelloWorld open',$!) outputToFile: 'LibrariesLoaded.st'
The #outputToFile: message saves to an specific file the receiver string of message. Basically if you saw the expression that will be recorded, you will see:
category: #TestingUI8 !
! HelloWorld class methodsFor: #defaults !
" Private - Return the support for mainView. "
! HelloWorld methodsFor: #initialize !
" Private - Initialize the contents of the receiver. "
| text |
self mainView leftTop: 50 @ 40.
self mainView title: 'Test Application'.
text := HTMLWidget text:'Hello World',$!!.
addChild: text! !
Headless mode allows to save several predefined files that will be loaded/filledIn at system startup time. For more info about this topic check [U8] Web headless. The previous expresion -the first one- saves several chunks of code. First, opens UI8 enviroment, then defines all HelloWorld code and finally opens our sample. The changes will take effect when you reload this contribution.
Note: As you know, in a web context, changes takes time to become real because of browser cache, so it is recomended to clear it.