60
Chapter 7: Flash Application Layout
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
/**********************************************************************
This app can be deleted if Target app does not exist or Target app is
not running.
**********************************************************************/
BOOL candelete(pFrame self)
{
Access_AMS_Global_Variables;
AppID targetID = EV_getAppID(TargetApp);
return targetID == H_NULL ||
(targetID != EV_appA && targetID != EV_appB);
}
7.3.4.2. How Localization Works
Applications call
XR_stringPtr
to look up a string given a string number. When
XR_stringPtr
looks up a string, it starts with the frame pointed to by the ACB
(Application Control Block) of the currently executing application (app identified
by
EV_currentApp
). The prototype chain of the object frame is searched for the
given string number. An unsuccessful search of the prototype chain tries again
with the prototype chain of the frame’s parent and ultimately to the system frame.
A language localizer app installs a new language by adding a new frame of
strings at the head of the target app’s object chain.
Here is how app frames are linked together before a localizer is installed.
00
app attributes & strings
system frame
0
ACB
00
app attributes & strings
system frame
0
ACB
Figure 7.3: Linked App Frames
The above figure illustrates an app frame with a parent link but no prototype link.
A string search would begin with the app frame then proceed to the system
frame.
After installing a localizer, the ACB is redirected to point first to the localizer
frame.