blob: 528c52938b3828e7a52c1082870e3796f0791670 [file] [log] [blame]
{{header}}
{{include field.fragment}}
% JS program to exexute
{{object 11 0}} <<
{{streamlen}}
>>
stream
function testGetField() {
try {
var field = this.getField("MyField");
app.alert("field is " + field.name);
var sub_a = this.getField("MyField.Sub_A");
app.alert("sub_a is " + sub_a.name);
var nonesuch = this.getField("MyField.nonesuch");
app.alert("nonesuch is " + nonesuch);
} catch (e) {
app.alert("Unexpected error: " + e);
}
}
function testGetArray() {
try {
var subs = this.getField("MyField").getArray();
app.alert("found " + subs.length + " sub-fields:");
for (i = 0; i < subs.length; ++i) {
app.alert(subs[i].name);
}
} catch (e) {
app.alert("Unexpected error: " + e);
}
}
function testMethods() {
try {
var field = this.getField("MyField");
} catch (e) {
app.alert("Unexpected error: " + e);
}
}
testGetField();
testGetArray();
testMethods();
endstream
endobj
{{xref}}
{{trailer}}
{{startxref}}
%%EOF