On Tuesday, November 19, 2013 8:39 PM [GMT+1=CET],
François Piette wrote:
>> I'm trying to use TnScript. I created a new form and added TnScript
>> only. I go to Properties and tick "Log". Then I try untick it, and
>> have "I/O Error 103". What is it?
>
> When you turn Log to ON, it opens the file given by LogFileName but
> somehow ignore some failure. When trying to close the file (Log :=
> FALSE), you get the I/O error 103 because the open was not successful.
> One cause could be the file already opened or readonly.
It is clearly a bug in the setter! What are you talking about?
{code}
procedure TCustomEmulVT.SetLog(Value : Boolean);
begin
if FLog = Value then
Exit;
FLog := Value;
if FLog then begin
{$I-}
AssignFile(FFileHandle, FLogFileName); // angus V6.01
Append(FFileHandle);
if IOResult <> 0 then
Rewrite(FFileHandle);
Write(FFileHandle, '<Open>');
{$I+}
end
else begin
Write(FFileHandle, '<Close>');
CloseFile(FFileHandle);
end;
end;
{code}
I leave fixing this stuff to the guy(s) who introduced it.
--
Arno
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be