Environment: Siren
AbstractEvent is the base class in the event/event-list hierarchy (although it can be instantiated). Instances of AbstractEvent are objects that can be used as dictionaries or property lists. Their properties can be accessed either with at: and at:put: or by using the new property names themselves as selectors (e.g., (anAEventInstance at: #color put: #green) or (anAEventInstance color: #green)).
Instance variables:
The global dictionary called Events can be used for sharing event instances.
accessing
properties
date
Answer the receiver's 'date'.
date: obj
Set the receiver's 'date'.
inspect
Inspect the receiver--Use a special inspector for Event types
name
Answer the receiver's 'name'.
open
Edit, play (if
Answer AEvent--all subclasses look like me
version
Answer the receiver's 'version'.
version: obj
Set the receiver's 'version'.
printing
display: showHide field: filter on: stream
displayField: filter on: stream
printOn: aStream
Format and print the receiver on the argument.
storeOn: aStream
Format and store the source the receiver on the argument.
templateFields
Answer the field names for the instances of the receiver class.
scheduling
Perform or interpret the receiver on the argument; override in subclasses.
properties
Answer a value from the property list dictionary (or an instVar).
at: aProp ifAbsent: otherCase
Answer a value from the property list dictionary or the value of the given block.
at: aProp put: aVal
Set a value in the receiver's property list dictionary (or instVar).
doesNotUnderstand: aMessage
Handle doesNotUnderstand: to try to access the property dictionary.
If this is unsuccessful, announce that the receiver does not understand the argument.
hasProperty: aSymbol
Answer whether or not the receiver's property list dictionary includes the symbol as a key.
properties
Answer the receiver's property list dictionary.
respondsTo: aSymbol
Answer whether the method dictionary of the receiver's class contains
aSymbol as a message selector OR if the selector is unary and is a key
in the receiver's property dictionary.
initialize-release
Set up the default state of the receiver--add props. dict.
release
Flush the receiver.
private
Make sure the receiver has a property list dictionary.
testing
Answer true.
isSound
Answer false.
comparing
Answer whether the receiver and the argument represent the same values.
MetaClass: AbstractEvent class
examples
Demonstrate the creation of an AEvent.
example
Demonstrate the creation of an AEvent.