Appendix A: System Routines — Symbol Table Utilities
1035
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
SymFindFirst
(continued)
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: SymFindNext, SymFindPrev, SymFindFoldername, FolderOp
Example:
This example walks through the HOME folder (not the folder ‘main’) which
is the folder that contains all of the folders. It uses
SymFindFirst
and
SymFindNext
to build a pop-up of all of the folders in the system. This is
basically the code for the
VarCreateFolderPopup
routine. See
FolderOp
for a description of why the HOME folder is locked during this operation.
HANDLE hPopup;
SYM_ENTRY *se;
BYTE HomeFolder[] = {0,127,0};
if ((hPopup = PopupNew( NULL, 0 )) == H_NULL)
return;
FolderOp( HomeFolder+2, FL_LOCK );
se = SymFindFirst( HomeFolder+2, FO_NONE );
while (se != NULL) {
if ((se->Flags & SF_FOLDER) && !IsTempNameChar(se->Name[0])) {
if (!PopupAddText( hPopup, EOF, (char *) se->Name, 0 )) {
FolderOp( HomeFolder+2, FL_UNLOCK );
PopupFree( hPopup );
return;
}
}
se = SymFindNext();
}
FolderOp( HomeFolder+2, FL_UNLOCK );
PopupDo( hPopup, -1,-1, 0 );
PopupFree( hPopup );