Sorry - this document is unfinished.
In order to make the code simple and easy to understand, we will only create a very simple and easy to understand application: a little person browser application.
The resulting application should be able to read Person objects from a file, add new Persons to that database and finally save the persons back onto the file.
In Smalltalk/X, a framework exists for typicaly applications, which
consists of the ApplicationModel, UIBuilder and ValueModel class hierarchies.
In order to make use of this framework, we create our application class
as a subclass of ApplicationModel.
In the browser, select the 'New Application' item from the
class-list-menu,
and accept the resulting class definition template:
ApplicationModel subclass:#PersonBrowser
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Applications'
After that, you can already start your new application, either by
evaluating:
Of course, there is not more than an empty application window - for now.
You may want to validate and reopen your application by double clicking
on the class again.
Now, your applications canvas should look like:
Text to be continued ...
in a workspace, or by double-clicking on the
PersonBrowser open
Modifying the Applications Menu
As a next step, change the applications menu using the menuBuilder:
select the 'menu specs' category in the browsers method-category-list,
then double click on the mainMenu selector.
This opens a menuBuilder.
Remove the 'New' and the 'Save'
items from the 'File' menu.
When finished, save-back the changed menu either by clicking on
the menuBuilders 'Save' button, or by selecting the menuBuilders
'Save' menu-item.
Then close the menuBuilder.
Modifying the Applications Window
Now, you should change the layout and appearance of our application,
to include a selection-list (to select a person) and a few inputFields
(to display and modify a persons data).
To do so, open a windowPainter on the applications windowSpec
method (double click on the selector), and drag a selectionInListView
(from the galleries lists-section) and a few labels plus inputFields (from the galleries
'text'-section) into the drawing canvas.
Arrange for the selectionList to occupy the top half of the window.
Continue in "Creating a WebApplicaiton".
Copyright © Claus Gittinger Development & Consulting
Copyright © eXept Software AG
Doc $Revision: 1.2 $ $Date: 1999/03/22 16:05:47 $