Category : Windows 3.X Files
Archive   : ACTTIMS.ZIP
Filename : VISTAPP.CLS
inherit(Object, #VistaPP, #(vistaTask
dbStatus
openType
activeDBs
inactiveDBs
), 2, nil)!!
setClassVars(VistaPP, #($DBEngine))!!
now(class(VistaPP))!!
Def showLib(self)
{
^$DBEngine;
}
!!
Def clearLib(self)
{
$DBEngine := nil;
}
!!
Def hookDLL(self)
{
setName($DBEngine, "\actor\vpp\vista.dll");
add($DBEngine, #DT_OPENTASK, 0, #(1));
add($DBEngine, #DT_CLOSETASK, 0, #(1));
add($DBEngine, #DT_DBDPATH, 0, #(1, 1));
add($DBEngine, #DT_DBFPATH, 0, #(1, 1));
load($DBEngine);
}
!!
Def new(self, otype | tmp)
{
tmp := new(self:Behavior);
if $DBEngine = nil then
$DBEngine := new(Library);
hookDLL(self);
endif;
^init(tmp, otype);
}
!!
now(VistaPP)!!
Def close(self)
{
dbStatus := pcall(procs($DBEngine)[#DT_CLOSETASK], vistaTask);
}
!!
Def activate(self, dataBase | i)
{
i := numItems(inactiveDBs) - 1;
loop while ((dataBase <> inactiveDBs[i]) and (i > -1))
begin
i := i - 1;
endLoop;
if (i > -1) then
^add(activeDBs, remove(inactiveDBs, i));
endif;
^nil;
}
!!
Def getOpenType(self)
{
^openType;
}
!!
Def changeOpenMode(self, mode)
{
if (numItems(activeDBs) = 0) then
if ((mode = "s") or (mode = "o") or (mode = "x")) then
openType := asciiz(mode);
^mode;
endif;
endif;
^nil;
}
!!
Def deactivate(self, dataBase | i, j, tmp)
{
i := numItems(activeDBs) - 1;
j := i - 1;
loop while ((dataBase <> activeDBs[i]) and (i > -1))
begin
i := i - 1;
endLoop;
if (i > -1) then
tmp := add(inactiveDBs, remove(activeDBs, i));
loop while (j >= i)
begin
setDbn(activeDBs[j], j);
j := j - 1;
endLoop;
^tmp;
endif;
^nil;
}
!!
Def getTask(self)
{
^vistaTask;
}
!!
Def addName(self, name)
{
add(inactiveDBs, name);
}
!!
/* method to initialize VistaPP Object. Init is called by the new class
method. Otype can be "o", "s", or "x". */
Def init(self, otype | tmp)
{
if (otype = "o" or otype = "s" or otype = "x") then
openType := asciiz(otype);
activeDBs := new(DBArray, 15);
inactiveDBs := new(DBArray, 15);
vistaTask := new(Struct, 20);
dbStatus := pcall(procs($DBEngine)[#DT_OPENTASK], vistaTask);
pcall(procs($DBEngine)[#DT_DBDPATH], asciiz("c:\actor\tims\"), vistaTask);
pcall(procs($DBEngine)[#DT_DBFPATH], asciiz("c:\actor\tims\"), vistaTask);
else
^error(self, "invalid open type.");
endif;
}
!!
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/