Anyone who has worked with application developers has probably come across a model that contains attributes that the application relies on. For example, an Excel model might have a column that is linked to another column in the model. If the column isn’t already a visible element in the UI, then you’d have to add it yourself. You’d also have to “warp” (or scale) the embedded value so it’s appropriate for the object being linked to. xResolver-ASL
Another common attribute is referred to as a “frame” or a “frame element.” When a user interacts with a spreadsheet, Excel uses one frame for the spreadsheet, and a different frame for each cell. The frames typically come in pairs, with one attached to the active sheet, and the other attached to a viewable index pane.
One of the reasons we need these frames is to save time and effort for the developer. Instead of changing the graphics and text style in each individual frame, we can use two different frames and modify them in place. Since frames are embedded in an object, we have to explicitly modify them in two places, but in the process, we also save ourselves from having to know where the frames exist in the application.
For example, say I’m using Microsoft Access to create a report on a website. The main page of the website has one sheet that contains the data from a database. To render the report, I’ll use two frames—one sheet, and one viewable pane—to display the data in the report. Accessor objects will be used to access the data in the frames. In most cases, I won’t have to alter the layout or markup in my report at all.
The 10 key concepts of Windows 10
In Windows 10, we’ll be able to make this type of scenario easier by using the new xResolver-ASL (or “orientation-aware name-space processor”) feature. To demonstrate the feature, I’m going to build a script that creates a spreadsheet that contains a frame for each frame element, along with two additional controls—a textBox control to display the values, and a button to add the sheet.
What’s a frame element?
When an application has an existing model that has a group of attributes that it wants to manage, it’s a good idea to put those attributes in a frame element. This makes the process of changing those attributes as part of the render process much easier and prevents the need for you to go back and change them if you update the model.
In a spreadsheet, you typically would have one sheet and one viewable pane. For example, an Excel model might contain attributes that have a dimension, a data type, and attribute namespaces. Instead of changing the attributes directly, you’d change the frame for the sheet, and associate the new frame with each value in the sheet. This is typically the process that a developer would use to make changes to the spreadsheet as the model is rendered.
If the sheet supports a group of items that aren’t linked to each other, then you’d have to add those items individually as frames or attach them as an adapter to the sheet. If you only have one item in the sheet, and you want to display its value in one frame, then you can associate that item with a “frame item” that has a label for each frame component.
XResolver-ASL is really just an orientation-aware name-space processor. It allows you to associate each frame element with an orientation that will be used when the frame is rendered. In this case, the sheets would display in different orientations depending on the client’s orientation. We’ll show how to associate each frame element with proper orientation in just a bit.
Creating the frames
For this example, I’m using a table-based Excel file in which each sheet is called a frame. The sheet with the data is called ‘sheet1’, and its control is called ‘sheet1-textbox’. The sheet with the data and the grid is called ‘sheet2’, and its control is called ‘sheet2-grid’.
In my sample, I have a textBox control, a grid, a textBox control, and a textBox control. Since I have two sheets in this example, there are two frames—one frame for each sheet.