説明
Ptr 関数は、子オブジェクトへのハンドルを返します。
引数
- handle:
light_userdata 型のハンドルです。オブジェクトでコロン記法を用いる場合は省略できます。
- Integer:
目的の子オブジェクトのインデックス番号(1ベース)です。
戻り値
- handle または nil:
子オブジェクトへのハンドルを返します。存在しない場合は nil を返します。
例
選択したシーケンスの最初の子に接続されたデータを、Dump() 関数で出力します。
|
return function() local selectedSequence = SelectedSequence() if selectedSequence == nil then ErrPrintf("There is no selected sequence.") return end local firstChild = selectedSequence:Ptr(1) if firstChild ~= nil then Printf("=============== START OF DUMP ===============") firstChild:Dump() Printf("================ END OF DUMP ================") else ErrPrintf("The object do not have a child object.") end end |