[Seaside] S-Exprs
Jim Benson
jb@speed.net
Sun, 26 May 2002 12:39:22 -0700
So now the questions start:
I have a class with instance variables 'question' and 'answer'.
I create my #html method:
html
^'
<form action="@accept">
<h1>[question]</h1>
<textarea rows="20" cols="80" sea:id="answer"></textarea>
<p><input type="submit" value="accept">
</form>
'
Works like a charm. Next, I want to convert this to S-Expr style so I:
html
^ #( form action: '@accept'
( h1 [question] )
( textarea rows: '20' cols: '80' sea:id answer )
( p (input type: submit value: 'accept' )))
and things are very unhappy. My first question:
How do you translate:
<h1>[question]</h1>
into an S-Expr?
Second question:
How do you translate:
<form action="@accept">
and:
<input type="submit" value="accept">
into the proper form? Is there an easy way to get a look at what the S-Expr
code translates into?
Jim