package CreationEvent import Setup public module CreationEvent private static constant Event create = new Event() private static constant Event dest = new Event() static function onCreation(Action action) returns Action create.addAction(action) return action static function onDestroy(Action action) returns Action dest.addAction(action) return action construct() create.callActions(this) ondestroy dest.callActions(this) endpackage