FAQ : Seaside : Q: How do I compensate for the lack of continuation support in VA Smalltalk Seaside
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
Section 11.9 and 11.9.1 of Dynamic Web Development with Seaside explains the general solution for this problem.
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) ] ]
To help you understand the required changes, http://www.instantiations.com/docs/files/FAQ_Hints/case57145.dat contains the SampleSeasideApp. This application includes the modified Contact, ContactListView, ContactView, ScrapBook, SimpleAnchor, and WebCounter classes as shown in the book.
Last modified date: 01/29/2015