>54
一番簡単な形だと、こんな感じ?
マルチキャストが必要なら、
MainWindow.tjsの"なんとかHook"とかみたくするとか。

class Foo
{
  var on_foo_event; // foofuncが呼ばれたよイベント
  function foofunc()
  {
    if (on_foo_event !== void)
      on_foo_event();
    System.inform('foofunc called');
  }
}
class Bar
{
  var bar_val;
  function foo_event_handler()
  {
    System.inform('B.foo_event_handler:'+bar_val);
  }
}
var a = new Foo();
a.foofunc(); // --> foofunc called
var b = new Bar();
b.bar_val = 200;
a.on_foo_event = b.foo_event_handler();
a.foofunc(); // --> foo_event_handler:200, foofunc called