/* pgm_12-1_aha.cmd */

.test~~new("Anton") ~~new("Berta") ~~new("Caesar")

SAY "Before synchroneous broadcast..."
.test~broadcast( .message~new(.nil, "say_info"), .true )
SAY "after synchroneous broadcast."
SAY

SAY "Before Asynchroneous broadcast..."
.test~broadcast( .message~new(.nil, "say_info"))
SAY "after asynchroneous broadcast."

::REQUIRES "pgm_12-1.cmd"

/* --------------------------- Test-Class -------------------------------- */
::CLASS test            METACLASS Manager

/* --------------------------- Class Methods ----------------------------- */
::METHOD Init           CLASS
  EXPOSE counter
  counter=0
  self~init:super

::METHOD count          CLASS
  EXPOSE counter
  counter=counter+1
  RETURN counter

/* --------------------------- Instance Methods -------------------------- */
::METHOD Init
  EXPOSE  name number
  USE ARG name
  number=self~class~count
  self~init:super

::METHOD name                 ATTRIBUTE

::METHOD say_info
  EXPOSE number
  SAY " SAY_INFO - name:" self~name "created as #" number