[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
example[spec] Add a widget - using spec: message
In Node8-Android:
1- start appS8
2- goto workspace list
3- select IMLT8
4- open 239 contribution
5- connect to Android device
6- in connected workspace type:
| mobileApp spec coo cooSpec widgets config newSpec widgets |
mobileApp := MainActivity singleton activeThread coordinator mobileCoordinator application.
coo := (mobileApp threads at: 1) coordinator.
cooSpec := coo template basicAt: #spec.
config := (JS @ cooSpec) @ #configuration.
widgets := (JS @ config) @ #widgets.
newSpec := (#class -> #MobileText ),
(#configuration -> ( (#order -> 6),(#text -> 'test text!') )).
JS @ widgets handleAt: #newText put: newSpec json.
"cooSpec is the new spec for coordinator template"
coo spec: cooSpec.
7- test text! appears below