home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
pc
/
files
/
shared.cst
/
00022_Script_DatabaseMgr
< prev
next >
Wrap
Text File
|
1997-07-24
|
2KB
|
70 lines
--o: Database Mgr
--This object creates/compiles databases, data lists, and data objects and passes the finished
--data structures to the objects using them.
Property pDatabaseMgrCastLst, pDelimators
--/ Developement
global gImplementedHS
--/
----------------------------------------------------------------------------ò
on mInit me, DatabaseMgrCastLst
--/
set gImplementedHS = []
--/
set pDatabaseMgrCastLst = DatabaseMgrCastLst
set pDelimators = the text of cast "Datapaks Deliminter"
return (me)
end
----------------------------------------------------------------------------ò
on mCreateDataPacks me, InventorDB
set HSDBscript = script("HSDataObject")
set dbMainText = the text of cast InventorDB
set endline = 0
set linetext = empty
set HSdatapak = [:]
set AvailibleFunctionTypes = [#PICT,#AREA,#TEXT,#FRAME]
set ListOfFunctionObjs = [#PICT:script "PICT Funct Parent Script",#AREA:script "AREA Funct Parent Script",¼
#TEXT:script "TEXT Funct Parent Script",#FRAME:script "FRAME Funct Parent Script"]
-- remove non-data items from beginning of database
repeat while (lineText <> "ú")
set endLine = endLine + 1
set linetext = line endLine of dbMainText
end repeat
delete line 1 to endLine of dbMainText
repeat while (dbMainText <> empty)
set lineText = Empty
set endLine = 0
repeat while (linetext <> "^")
set endline = endline + 1
set linetext = line endline of dbMainText
end repeat
set HSdata = line 1 to endline of dbMainText
delete line 1 to endline of dbMainText
set HSinitLine = line 1 of HSdata
set FunctionType = value(item 3 of HSinitLine) --returns #PICT, #AREA, #NOTHING, etc.
set AssociatedHs = value(item 1 of HSinitLine)
add(gImplementedHS,AssociatedHs)
set AreaFunctionObject = Birth(getProp(ListOfFunctionObjs, FunctionType))
set DataPakobj = Birth(HSDBscript)
mInit( DataPakobj, HSdata, AreaFunctionObject,pDelimators)
addprop (HSdatapak,AssociatedHs,DataPakobj)
end repeat
return ( HSdatapak )
end
----------------------------------------------------------------------------ò