20 Jul 01:42
Problem with Checkboxes
From: Felix Dorner <felix_do <at> web.de>
Subject: Problem with Checkboxes
Newsgroups: gmane.comp.lang.smalltalk.squeak.seaside
Date: 2008-07-19 23:46:06 GMT
Subject: Problem with Checkboxes
Newsgroups: gmane.comp.lang.smalltalk.squeak.seaside
Date: 2008-07-19 23:46:06 GMT
Hey,
first, I am a Squeak/Smalltalk newcomer, so please forgive me if I make
an obvious error. I also give as much detail as I can and would greatly
appreciate general comments.
I am trying to write a small survey application, for that I created a
class WASurvey:
WAComponent subclass: #WASurvey
instanceVariableNames: 'survey questionsPerPage currentPage'
classVariableNames: ''
poolDictionaries: ''
category: 'questionaire'
survey is a list of questions, questionsPerPage/currentPage should be
obvious.
The component is rendered like that:
renderContentOn: html
| first last |
first := currentPage - 1 * questionsPerPage + 1.
last := first + questionsPerPage - 1.
html heading: survey title.
html text: currentPage; text: '/'; text: self pageCount.
html form: [
survey questions from:first to:last do: [ :question | question
renderContentOn: html ].
html submitButton text: 'Previous Page';
(Continue reading)
RSS Feed