![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
UTS Connect User's Guide
APPENDIX B
The Screen.getAttribute()
method will return one of the values shown below, representing the current attribute state of the onscreen character at the given location. The attributes listed below are just the most common and any combination of what is stated below could, theoretically occur. Basically, underlined, bold, blinking and reverse characters return a standard integer. This is then added to the hexadecimal number indicating whether the field is secure, protected, selected and/or vertical.
Using the Screen.getAttribute()
method, you can easily write a function that captures all attributes (at all screen locations) at once. The following custom script, for example, can be used at design time to display screen attributes in an alert dialog.
function showAttributes( myScreen ) { var attribs = new String(); // create empty string // Iterate over all rows and columns: for (var i = 1; i <= myScreen.getRows(); i++, attribs += "\n" ) for (var k = 1; k <= myScreen.getCols(); k++) attribs += " " + myScreen.getAttribute(i,k); }
In your Action Model, you would include a function action with the following ECMAScript expression to call the script.:
alert(showAttributes( Screen ));
The following illustration shows a UTS screen:
The illustration below shows the result of applying the showAttributes()
function to the screen (the illustration had to be cropped as the right/left margin would have gone outside the boundaries of the page):
Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...