[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

example[spec] Modify the title of a MobileCoordinator -changed for ios

First load mobile[iosTesting]Two tabs app for testing in ios

" two-tabs app is used for this example "
" self is a MobileThreadAction instance "
" In global App: MobileApplication instance "
| currentThread jsObject js coordinatorSpec coordinatorConf |
" MobileApplication instance does not hold current thread, so look for it"
currentThread := (App threads select: [:thread | thread tool = #mobile]) first.

jsObject := currentThread basicAt: #spec.
js := JS @ jsObject.
coordinatorSpec := js @ #coordinator. 
coordinatorConf := (JS @ coordinatorSpec) @ #configuration.

" change the property "
(JS @ coordinatorConf) handleAt: #title put: #newTitle.

" update rendered UI "
App fromJSon: (App basicAt: #spec).
App open