[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
example[spec] Modify a thread
" modify tasks thread name to *changed* "
" self is a MobileApplication "
| jsObject threads tasksThread |
jsObject := self basicAt: #spec.
threads := (JS @ jsObject) @ #threads.
tasksThread := (JS @ threads) @ 1.
" instead of picking the thread at a given position, we could iterate to find the thread with tool named #tasks "
" change thread name "
(JS @ tasksThread) handleAt: #tool put: #changed.
" update Mobile Application threads "
self threads at: 1 put: ((self device newThreadFor: self)
fromJSon: (JS @ threads) @ 1;
yourself).
" refresh redendered UI "
self open