Q: How do I compensate for the lack of continuation support in VA Smalltalk Seaside
Problem
VA Smalltalk does not currently support 'continuations'. This means that WAComponent>>#wait: and all methods sending #wait: (this includes #call:, #request:, #confirm:, #inform: and several other methods) are not supported.
Solution
So, for example, the #addContact method shown in section 9.6:
addContact
| name emailAddress |
name := self request: 'Name'.
emailAddress := self request: 'Email address'.
Contact addContact: (Contact name: name emailAddress: emailAddress)
would look like this after making the required modifications:
addContact
| name emailAddress |
self
show: (WAInputDialog new
addMessage: 'Name';
yourself)
onAnswer: [ :ans1 |
name := ans1.
self
show: (WAInputDialog new
addMessage: 'Email address';
yourself)
onAnswer: [ :ans2 |
emailAddress := ans2.
Contact addContact: (Contact name: name emailAddress: emailAddress) ] ]
Last modified date: 01/29/2015