home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 2
/
DATAFILE_PDCD2.iso
/
utilities
/
_dbassist
/
!DBAssist
/
!Help
< prev
next >
Wrap
Text File
|
1994-08-11
|
3KB
|
125 lines
>!Help
!Help file for !DBAssist
Version 1.02 (11 Aug 1994)
------------------------------------------------------------------------------
DBAssist is FREEWARE and is by Keith Hall.
You may freely distribute this program in its entirety with ONLY the following
unaltered files:
!Boot
!Help (This one)
!Run
!RunImage
!Sprites
Templates
This program is © Keith Hall 1994. You may NOT include this program or any
part thereof in any commercial software without my prior written permission.
Technical details
-----------------
DBAssist is a small utility program to aid debugging desktop programs.
Instead of having to use Wimp_ReportError to display variables etc. whilst
debugging, or writing them to a file which possibly could be corrupted if the
software crashes the machine, it should send a wimp message to DBAssist,
which will then display the line in a window and optionally write it to a file
also.
To use !DBassist in your programs (conversion from data types other than
strings should be done in the usual way for the language concerned) :
BASIC:
DEF PROCtrace(line$)
DIM msgblock% 256
!msgblock%=(24+LEN(line$)) AND NOT 3
msgblock%!4=0
msgblock%!8=0
msgblock%!12=0
msgblock%!16=&82782
$(msgblock%+20)=line$
SYS"Wimp_SendMessage",17,msgblock%,0
C: (DeskLib)
void trace(char *line)
{
message_block msg;
msg.header.size=(24+strlen(line)) & ~3;
msg.header.action=0x82782;
strcpy(msg.data.bytes,line);
Wimp_SendMessage(event_SEND,&msg,0,NULL);
}
C: (Risc_OSLib)
void trace(char *line)
{
wimp_msgstr msg;
msg.hdr.size=(24+strlen(line)) & ~3;
msg.hdr.action=0x82782;
strcpy(msg.data.chars,line);
wimp_sendmessage(17,&msg,0);
}
To make !DBAssist automatically use the logfile when it's loaded, change the
!Run file so that the line :
Run <DBAssist$Dir>.!RunImage %*0
becomes
Run <DBAssist$Dir>.!RunImage -log %*0
Alternatively you can load the program with a commandline parameter of '-log'.
The format of the lines produced by DBAssist are as follows :
Date [taskname] textmessage
'textmessage' is the textual contents of the message sent by the task wishing
!DBAssist to display.
'[taskname]' is the name of the task responsible for sending 'textmessage'.
Clicking left button on the iconbar icon opens the text window, right button
closes it again.
Changes to V1.01
Faster. Will now only record the time and the text message in the logfile.
The task name is recorded whenever it changes, to save space and aid
readability.
Changes to V1.02
Automatic dbassist logging detection provided for those programs capable
of writing their own logfile, so they can switch output (e.g. Binkley).
The message is #&82782 (as above, but the first word of the data in the
message being the 'action' code). Codes are:
&827820 - enquire and force DBAssist to respond if present
&827821 - sent by DBAssist when starting and after receiving &827820
&827822 - sent by DBAssist when shutting down.
------------------------------------------------------------------------------
Send bug reports, useful additions, compliments etc. to me on The Plasma
Sphere (#1), Arcade (#1147), or in the ARCNET echo. You can also netmail me
at Fidonet#2:250/219.0
Cheers,
|/
|\eith.