PowerBuilder では、describe() 関数を使用して、DataWindow オブジェクトとそれらのコントロールのプロパティーを特定できます。describe() 関数は、PowerBuilder の DataWindow でのみ使用できます。describe() 関数によって返されるストリングは、describe() 関数の一部として指定されたパラメーターの結果として得られます。例えば、表形式の表示内容における列のデータ・タイプを特定できます。以下の例のように、describe 関数を IBM® Rational® Functional Tester で使用できます。
例 1: この例では、PowerBuilder の
describe() 関数にパラメーターを渡し、結果をストリングとしてレポートする方法を示します。表示される結果は、従業員の名前および出身地です。
//Get the figure for an EditPart
public void testMain(Object[] args)
{
String ls_request;
String ls_report;
ls_request = "DataWindow.Bands DataWindow.Objects "
+ "empname_h.Text "
+ "empname_h.Type emp.Type emp.Coltype "
+ "state.Type empname.Type empname_h.Visible";
ls_report = dw_1.Describe(ls_request);
}
PowerBuilders の
describe() 関数について詳しくは、PowerBuilder のヘルプを参照してください。