| |
CRChar
category: Genie-Engine
superclass: Object
subclasses:
This class represents a genie character.
Originally, characters were real characters (one single ascii character), but now, a character is much more general.
Basically, there are 3 different types of characters:
- Sequence of character (keystrokes) [type = #strokes]:
This category consists of any character sequence not starting with
a #. Sequences starting with a # can be entered by enclosing them inti ''.
(e.g. '#keystrokes' instead of #keystrokes)
- Command [type = #command]:
A command is basically a symbol.
Commands are used to tell the target Morph to do certain actions.
There are a lot of predefinied commands available (#inspectLastGesture, #switchCase,
#inspectDictionaries, etc.). But new commands can be added all the times.
- Code [type = #code]:
A genie character can contain any kind of Squeak code.
The format to enter a code character is the following: #Header#Code, whereas
Code is general Squeak code and Header is a descriptive string that can be omitted.
(Example: '#beep#Smalltalk beep' or just: '##Smalltalk beep').
When the gesture assigned to the code character is recognized, a MorphicGestureEvent
is sent to the target Morph. Then the entered code gets executed with the
MorphicGestureEvent as the receiver.
In each case, the contents of the character is stored in the instance variable 'string'.




|
|