[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
example[spec] Add a new thread
" add a Test dummy thread as the last thread "
" self is a MobileApplication "
| jsObject threads dummyCoordinator |
dummyCoordinator := (
(#tool -> #Test),
(#coordinator -> (
(#class -> #MobileEditor),
(#configuration -> (
(#title -> 'Dummy')
jsObject := self basicAt: #spec.
threads := (JS @ jsObject) @ #threads.
" add the thread to the application spec "
(JS @ threads) handleAt: 5 put: dummyCoordinator json.
" add the thread to MobileApplication "
self threads add: (
(self device newThreadFor: self)
fromJSon: (JS @ threads) @ 5;
" refresh rendered UI"