
I would like to insist that:
You can do it, of course. But Squeak-Croquet is a 3D easy metaphor for remote "work in group". Something like we have (in 2D) at the product "Groove". But, using Groove you need to create an application specific for remote "work in group". Using Croquet you will develop a normal application and Croquet will create, automaticaly, an environment (in 3D) where this application can be used simultaneously by a group of people (represented by their "avatares").
YOU DON'T NEED TO BE AN ARTIST, A 3D MODELER TO USE CROQUET!
If you like, you don't need to do any 3D model, you don't need to know "3ds max" or Blender. In the previous lesson you saw an example of this. We will see many other exercices without any new 3D model created.
And you will use 95% of the time the Classes of Smalltalk and Squeak and not the Classes of Croquet (sometimes not very friendly).
At this and some next lessons we will present easy, basic "projects" using Squeak. This is an "introdutory course"! They can be not specific for remote "work in group". But you need to know the basics for the creation of more sophisticated applications.
At the previous lesson we have used a TextBox. Now we will explain how to create and use a Button - that can be pressed by any visitor at the "island" having the application (we like to call it "the hoster island").
The exercice is: we will have two TextBoxes and we would like that: when we type something in one (called In1) this string is transported for the other (called Out1) when a button is pressed.
Open a new "morphic project" - like we did in the previous lesson.
Drag two TextBoxes and change their names, opening the Viewer of each object and typing over the default name.
It's usual to work opening the script for the output object (here Out1). Do it draging the arrow of the line "Out1 characters <- abc", like we did at previous lesson.
Now we will learn an spectacular resource of Squeak: we can do part of the program visually! Sometimes you can do all the program.
Open the Viewer of In1 and drag only the part "In1 characters" of the line having: "In1 characters <- abc" over the part abc in the script window. Look the figure.
TIP: When you open a new Viewer and there are another open, the previous will go to be represented by an icon that can be clicked to reopen that Viewer
Opening the window of code (like in the previous lesson) we will see the code:
self setCharacters: In1 getCharacters
ATTENTION: Without a final point because it's the last line of code.
To create the ilusion of transport we would like that the input area is cleared; so, we complete the script to be:
self setCharacters: In1 getCharacters. In1 setCharacters: ''.
And we do the "accept" like in the previous lesson.
We can run the script clicking the "yellow exclamation" but we will now to do something better. Clicking over the name Out1 we open a window and select: "button to fire this script":
Clicking in the Menu of the "halo" of the button that appears, we can change its label to "TRANSPORT".
We can move all the objects using the "Move" button of the halo, to have the final project. You can also enlarge anything using the "Change size" button of the halo.
To erase the default texts of the TextBoxes (abc), for the "initial situation" of the "form" of the application, we can (like usual) drag the pointer over the letters and press the tab key of the keyboard.
Put the "caret" in the In1 TextBox before to clean all the work area (closing all the work windows) and to save the project (like we did in previous lesson). The project name will be "Transportation".
Do a "big save". Close Croquet. Verify if the project is at the folder Squeaklets.
TIP: Reopening Croquet you will go to the window at the moment of the last "big save". To return to the "main window": World window | previous project
Open the "MPEG Demo" and load the project - like we did in the previous lesson. Open the "Sailing" island, change the avatar to be "Alice" and open a Portal to the other world.
PREVIOUS LESSON NEXT LESSON T. CONTENTS HOMEPAGE
