
24
Programming Concepts
Example:
function onDecode(decode)
{
data = decode.data;
if (decode.symbology == some-special-symbology)
{
data = transformed decode.data;
}
else if (decode.symbology
== some-other-special-symbology)
{
data = differently transformed decode.data;
}
if (data matches employee-badge format)
{
loginForm.employeeField.text = decode.data;
loginForm.pinField.text = "";
gui.showForm(loginForm);
return null;
}
else if (data matches part-number format)
{
stockForm.partField.text = decode.data;
gui.showForm(stockForm);
return null;
}
else if (data matches shelf-number format)
{
stockForm.shelfField.text = decode.data;
gui.showForm(stockForm);
return null;
}
else if (data matches wrong formats)
{
warning.text = "bad code for this application";
Содержание OHV300
Страница 1: ...FACTORY AUTOMATION MANUAL JAVASCRIPT PROGRAMMING GUIDE...
Страница 88: ...88 Supported JavaScript Core delete function in instanceof new this typeof void...
Страница 93: ...93 Symbology ID Modifier Information...
Страница 94: ...TDOCT 4981_ENG 11 2015...