[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
[UI8] UI8Application Sample - Hello
Sample.st
UI8Application
subclass: #SampleApp
instanceVariableNames: ''
category: #Sample !
! SampleApp class methodsFor: #defaults !
mainViewSupport
" Private - Return the support for mainView(or nil). "
^TopPane! !
! SampleApp methodsFor: #initialize !
setInitialContents
" Private - Initialize the initial contents of the receiver. "
| button image |
button := ButtonWidget new.
button
text: 'Press here to edit';
when: #click: do: [ 'Hello' edit ];
yourself.
image := ImageWidget icon: #accept.
image when: #click: send: #sample to: self.
self mainView
, button
, #( '<hr>' )
, image.! !
! SampleApp methodsFor: #samples !
sample
self prompt: 'Sample prompt value?' ! !
Open with...
In a workspace | SampleApp open |
Inpage Body | <body onLoad=" 'SampleApp open'.doIt(); " > |