ViewLogic: detachFrom()

ViewLogicAlierView から取り外します。

構文

ViewLogic.detachFrom(containerToBeDetached, oldHost) => ViewLogic | null

引数

  • containerToBeDetached: ViewLogic

    取り外す対象の ViewLogic です。

  • oldHost: AlierView

    containerToBeDetached を取り外す元の AlierView です。

返値: ViewLogic | null

引数 oldHostViewLogic が取り付けられている場合はその ViewLogic です。取り付けられていない場合は null が返されます。

例外

  • TypeError
    • 引数 containerToBeDetachedViewLogic でなかった場合
    • 引数 oldHostAlierView でなかった場合

解説

containerToBeDetachedoldHost に取り付けられている場合、この関数の呼び出しは oldHost.detach() と等価です。

メッセージ

メッセージの概要についてはメッセージパッシングを、他のメッセージについては ViewLogic の状態変更を通知するメッセージを参照してください

このメソッド呼び出しでは containerToBeDetached に以下のようなメッセージが送出されます:

  • id: "vl$detached"
  • param: { target, oldHost }
    • target: ViewLogic --- 変更された ViewLogic 自身
    • oldHost: ViewElelemnt --- 以前に host に設定された AlierView
  • origin: ViewLogic
  • target: ViewLogic

このメッセージは oldHost.detach() でも送出されます。