Category : Windows 3.X Files
Archive   : ACTTIMS.ZIP
Filename : DELETEDL.CLS
inherit(TimsDialog, #DeleteDlg, #(info), 2, nil)!!
now(class(DeleteDlg))!!
now(DeleteDlg)!!
Def delete(self | tmp, tmp2)
{
if new(ErrorBox, ThePort,
"Are you sure you want to delete this item?",
"TIMS", MB_YESNO bitOr MB_ICONQUESTION) = IDNO then
^FALSE
else
tmp := new(InfoObj, database);
loop
while firstMember(tmp, info, ARTICLE_LIST) = S_OKAY begin
disConFrom(tmp, ARTICLE_LIST);
endLoop;
tmp := new(BorrowObj, database);
setOwner(tmp, info);
loop
while first(tmp) = S_OKAY begin
discon(tmp);
disConFrom(tmp, LOAN_HISTORY);
delete(tmp);
endLoop;
tmp := new(TextObj, database);
setOwner(tmp, info);
loop
while first(tmp) = S_OKAY begin
discon(tmp);
delete(tmp);
endLoop;
tmp := new(IntersectObj, info, database);
tmp2 := new(KeyWordObj, database);
setOwner(tmp, info);
loop
while first(tmp) = S_OKAY begin
discon(tmp);
getOwnerOfSet(tmp, tmp2, KEY_TO_INFO);
disConFrom(tmp, KEY_TO_INFO);
delete(tmp);
if memCount(tmp2, KEY_TO_INFO) = 0 then
delete(tmp2);
endif;
endLoop;
tmp := new(AuthorObj, database);
getOwner(info, tmp);
discon(info);
delete(info);
if memCount(tmp, HAS_PUBLISHED) = 0 then
discon(tmp);
delete(tmp);
endif;
^end(self, 0);
endif;
}
!!
Def view(self | LBStr, author)
{
LBStr := new(String, 16);
LBStr := getLBText(self, IDI_LIST);
if size(LBStr) > 0 then
author := new(AuthorObj, database);
findKey(info, ID_CODE, LBStr);
getOwner(info, author);
setItemText(self, IDI_AUTHOR, getName(author));
setItemText(self, IDI_TITLE, getInfoTitle(info));
enableItem(self, IDI_OK);
else
setItemText(self, IDI_AUTHOR, "");
setItemText(self, IDI_TITLE, "");
disableItem(self, IDI_OK);
endif;
}
!!
/* By returning a 1 from the INITDIALOG message, we
are telling MS-Windows to set the input focus to
first tabstop item. (See MS-Windows Reference). */
Def initDialog(self, wP, lP | stat)
{
database := getDB(parent);
info := new(InfoObj, database);
stat := firstKey(info, ID_CODE);
loop
while stat = S_OKAY begin
addLBText(self, IDI_LIST, getIdCode(info));
stat := nextKey(info, ID_CODE);
endLoop;
disableItem(self, IDI_OK);
^1;
}!!
Def command(self, wp, lp)
{ select
case wp == IDI_CANCEL
is ^end(self, 0);
endCase
case wp == IDI_OK
is
delete(self);
endCase
case wp == IDI_LIST and high(lp) = LBN_DBLCLK
is
delete(self);
endCase
case wp == IDI_LIST
is view(self);
endCase
endSelect;
^0;
}!!
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/