Chapter 7: Flash Application Layout
39
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
7.3.1.1. FRAME
Here is how a typical frame looks.
#define STRING1 (OO_FIRST_APP_STRING+0)
#define STRING2 (OO_FIRST_APP_STRING+1)
FRAME(
frameName
,
parent
,
prototype
,
firstAttr
,
count
)
ATTR(
attrSelector
,
value
)
ATTR( . . . )
.
.
.
ATTR(OO_FIRST_STRING+STRING1, "a string")
ATTR(OO_FIRST_STRING+STRING2, "another string")
.
.
.
ENDFRAME
The
FRAME
macro defines the header of an object frame, an
OO_Hdr
structure.
•
frameName
— name of the object frame. This becomes the name of the
OO_Hdr
structure.
•
parent
— pointer to another frame higher in the object hierarchy. This field
should contain
OO_SYSTEM_FRAME
, a pointer to the root of the object hierarchy
in the OS.
•
prototype
— pointer to another frame on the same level of the object
hierarchy, often another frame within the application. This value can be zero
(0) if the application has only one object frame. At any rate, this value must
be zero in the last prototype frame of a linked list.
•
firstAttr
— number of the first attribute or method selector in the frame. This
must be the same value as the
attrSelector
of the first
ATTR
macro in the
frame.
•
count
— count of attributes and method selectors in the frame.
The
FRAME
header is followed by
ATTR
macros which define frame attributes
(
OO_Attr
structures).
•
attrSelector
— the selector number of the attribute. Every selector within a
frame must be unique and sorted into increasing order. The object frame
accessor functions (
OO_GetAttr
and
OO_SetAttr
) look up frame attributes by
their selector number.
Note:
The OS does not check that attribute selectors are in increasing order. You must
make sure the attributes are in order when you create the frame. Attribute look-up
will fail if they are not.