Class:            AbstractEvent

Environment:      Siren
Superclass:         Object
Category:         Music-Events
Instance variables:   properties

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:
   properties    property list dictionary

The global dictionary called Events can be used for sharing event instances.

accessing

, anArgument
   Add the argument as a property of the receiver.

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 ) or inspect (if ) the receiver, depending on the keyboard state

species
   Answer AEvent--all subclasses look like me

version
   Answer the receiver's 'version'.

version: obj
   Set the receiver's 'version'.

printing

asExplorerString: showHide
   

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

scheduleOn: aChannel
   Perform or interpret the receiver on the argument; override in subclasses.

properties

at: aProp
   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

initialize
   Set up the default state of the receiver--add props. dict.

release
   Flush the receiver.

private

propCheck
   Make sure the receiver has a property list dictionary.

testing

isEvent
   Answer true.

isSound
   Answer false.

comparing

= anObject
   Answer whether the receiver and the argument represent the same values.

MetaClass:         AbstractEvent class

examples

eventInspectExample
   Demonstrate the creation of an AEvent.

example
   Demonstrate the creation of an AEvent.