🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #125413

[Dialog] Scripting problem

#125413
From: Norbert Schmidt
Date: Mon, 26 May 2003 15:10
103 lines
4250 bytes
Hello,

I tried my luck with a little test script, but the result was that it took
40tude down with an access violation and Windows even showed a blue screen. 

What did I do wrong?

> program OnXover;
> 
> uses TextFile;
>                
> procedure ws( var fh:TextFile; s:String; val:String );
> var
> 	os:string;
> begin
> os := Format( '-%20s: %s', [s,val] );
> TextWriteLn( fh, os );
> end;
> 
> procedure wi( var fh:TextFile; s:String; val:integer );
> var
> 	os:string;
> begin
> os := Format( '-%20s: %d', [s,val] );
> TextWriteLn( fh, os );
> end;
> 
> procedure wb( var fh:TextFile; s:String; val:boolean );
> var
> 	os:string;
> begin
> os := Format( '-%20s: %s', [s,val] );
> TextWriteLn( fh, os );
> end;
> 
> procedure wx( var fh:TextFile; s:String; val:integer );
> var
> 	os:string;
> begin
> os := Format( '-%20s: %x', [s,val] );
> TextWriteLn( fh, os );
> end;
> 
> 
> procedure OnXover(Var XoverData:TXoverData);
> var
> 	fh: TextFile;
> begin
> //Your code goes here
> 
> AssignFile( fh, 'Test.40l' );
> Rewrite( fh );
> wi( fh, 'groupkey', XoverData.GroupKey );
> wi( fh, 'articleindex', XoverData.articleindex );
> wb( fh, 'new', XoverData.new );
> ws( fh, 'msgid', XoverData.msgid );
> ws( fh, 'subject', XoverData.subject );
> ws( fh, 'from', XoverData.from );
> ws( fh, 'extradata', XoverData.extradata );
> ws( fh, 'references', XoverData.references );
> wb( fh, 'isreply', XoverData.isreply );
> wx( fh, 'fcolor', XoverData.fcolor );
> wx( fh, 'bcolor', XoverData.bcolor );
> wx( fh, 'bodystate', XoverData.bodystate );
> wx( fh, 'watchstate', XoverData.watchstate );
> 
> CloseFile( fh );
> 
> end;
> 
> begin
> end.

Im fluent in C/C++ and Perl, but my memory about Pascal is quite vague,
since the last time I "spoke" that language was when "Turbo Pascal 2.0" for
CP/M was the best (and only) IDE. So please excuse me if I make beginners
mistakes.


I could post the whole error log that dialog managed to regurgitate before
it died, but that nwouldn't help much. Here's an excerpt that might be
useful (IMHO):

> Stack list, generated 26.05.2003 16:30:02
> [00404480] System.TObject.Free + $8
> [00404B35] System.@HandleOnException + $B1
> [004447B6] JclDebug.TJclStackBaseList.Create (Line 3092, "jcldebug.pas" + 3) + $5
> [0074244F] cScripting.TDialogAppScripts.OnXOver_ (Line 934, "cScripting.pas" + 14) + $1A
> [0054C613] ifps3.FreePIFVariantList (Line 4383, "ifps3.pas" + 6) + $0
> [0074247E] cScripting.TDialogAppScripts.OnXOver_ (Line 939, "cScripting.pas" + 19) + $E
> [00742492] cScripting.TDialogAppScripts.OnXOver_ (Line 943, "cScripting.pas" + 23) + $C
> [007424A8] cScripting.TDialogAppScripts.OnXOver_ (Line 943, "cScripting.pas" + 23) + $22
> [00713356] cThreads.TNNTPGetHeadersThread.NNTPXover (Line 1312, "cThreads.pas" + 110) + $0
> [00713B82] cThreads.TNNTPGetHeadersThread.NNTPXover (Line 1447, "cThreads.pas" + 245) + $144
> [00520239] MyNNTP.TMyNNTP.ProcessXOverList (Line 96, "MyNNTP.pas" + 9) + $0
> [0052027C] MyNNTP.TMyNNTP.ProcessXOverList (Line 99, "MyNNTP.pas" + 12) + $B


Regards, Norbert
-- 
Please post your replies to the news group only.
For questions concerning my address please read <http://www.privacy.net>.
Technical Details
Message-ID: <rra5kc7n7v7r.ddfywin976xx.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!p508b0076.dip0.t-ipconnect.DE!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <rra5kc7n7v7r.ddfywin976xx.dlg@40tude.net>
Subject: [Dialog] Scripting problem
Date: Mon, 26 May 2003 17:10:23 +0200
From: Norbert Schmidt <me@privacy.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed.vmunix.org!fu-berlin.de!uni-berlin.de!p508b0076.dip0.t-ipconnect.DE!not-for-mail
Newsgroups: news.software.readers
Lines: 102
NNTP-Posting-Host: p508b0076.dip0.t-ipconnect.de (80.139.0.118)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: fu-berlin.de 1053961824 3475875 80.139.0.118 (16 [188787])
User-Agent: 40tude_Dialog/2.0.4.1