JMP アプリケーション: 動的パネル ボックスの子要素にアクセスするこんにちは、
ユーザーがボタンのクリック時に必要な数を指定すると、テキストボックスのラベルとテキスト編集ボックスが動的に作成されるアプリコードを書いています。
textEditBoxList = {}; // global variable<BR />LoadSteps = function ({thisBox}, {Default Local},
steps_number = NumberEdit1 << Get; // get number of items from number edit box
For(i=1, i<= steps_number,i++,
textBox = Text Box("Step : " || Char(i));
textBox << Set Width(100);
textEBox = Text Edit Box( "Enter text here...");
textEBox << Set Width(300);
Insert Into(textEditBoxList,textEBox);
print(textEditBoxList); // Its always empty
Panel1 << Append(
H List Box(
textBox,
textEBox
)
);
);
);ここで、別のボタンをクリックして、パネル ボックスのすべての子要素の textEBox の内容にアクセスします。
グローバル変数を作成し、それを介してアクセスしようとしましたが、機能しません。これを実現するための代替方法またはより良い方法があれば助かります。
前もって感謝します
自動化とスクリプトRe: JMP アプリケーション: 動的パネル ボックスの子要素にアクセスするXPathを使用してテキスト編集ボックス(またはテキストボックス)への参照のリストを取得するか、またはあなたが行っているようにリストを利用します。
Names Default To Here(1);
nw = New Window("",
panel1 = Lineup Box(N Col(2))
);
steps_number = 3;
textEditBoxList = {};
For(i = 1, i <= steps_number, i++,
textBox = Text Box("Step : " || Char(i));
textBox << Set Width(100);
textEBox = Text Edit Box("Enter text here...");
textEBox << Set Width(300);
Insert Into(textEditBoxList, textEBox);
Panel1 << Append(H List Box(textBox, textEBox));
);
tebs = panel1 << XPath("//TextEditBox");
show(tebs, textEditBoxList);