[BLACKBOX] AW: [BLACKBOX] Problems with Windows7

From: [at]} <>
Date: Thu, 23 May 2013 17:00:58 +0000

Hi all,

 

I have the same problem each time I change a source file but as stated by Rainer for me it‘s

only an annoyance.

 

Associated with Windows 7 I encountered another problem. From time to time for me it is

not possible to connect Blackbox-Versions >= 1.5 to an ORACLE-database. I have

to restart the computer then and have the problem solved normally.

 

This problem occurs on all computers in our company where Blackbox is used but in

less than 10 % of all starts of Blackbox. It can occur if Blackbox is started as first application

or later.

 

With version 1.3.2 of Blackbox which still is used daily in our company and Windows 7

or versions >= 1.5 and Windows XP we never had problems like this.

 

Does anybody have an idea what causes this problem and how it can be solved?

 

Thanks in advance and best regards

 

Gerhard Marent

 

 

 

 

Von: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Gesendet: Donnerstag, 23. Mai 2013 17:35
An: BLACKBOX{([at]})nowhere.xy
Betreff: [BLACKBOX] File write error with Windows7

 

Hi all,

I have a strange effect when saving a modified source file:

An alert box titled “File Error” shows up containing the message

 

<file> could not be replaced because it is in use

 

When I press the button in the box to repeat the action, the file is saved without any problem.

This effect never showed up on Windows XP systems but happens many times on Windows7.

 

It is annoying when editing source files but is actually a BIG problem to me because in my current application (Windows XP up to now; one run taking several hours) I write some status files periodically. On Windows7 this effect would cause my application to stop several times every minute and wait for somebody to click a button.

 

It does not show up when the file to be saved contains just a few dozens of lines.

It does not show up too when I write an empty file but showes up when I have appended a line to an existing file and save the file.

 

 

This is a sketch of my code causing this problem:

 

                PROCEDURE WriteToFile (VAR path, name, string: ARRAY OF CHAR);

(* file must exist and must be a text file *)

                                VAR

                                                formatter: TextMappers.Formatter;

                                                locator: Files.Locator;

                                                model: TextModels.Model;

                                                view: Views.View;

                BEGIN

                                locator := Files.dir.This (path);

                                view := Views.OldView (locator, name);

(* omitted code for checking "locator.res = 0" and "view IS TextViews.View" *)

 

                                model := view (TextViews.View).ThisModel (); (* get the model of the view *)

                                formatter.ConnectTo (model); (* connect a formatter to the text *)

                                formatter.SetPos (model.Length ()); (* set position to end of text *)

 

                                formatter.WriteString (string)

                                formatter.WriteLn;

                                Views.RegisterView (view, locator, name)

                END WriteToFile;

 

 

 

Writing an empty file works without any problems:

 

                PROCEDURE StatusFileWrite (VAR path, name: ARRAY OF CHAR);

                                VAR

                                                formatter: TextMappers.Formatter;

                                                locator: Files.Locator;

                                                model: TextModels.Model;

                                                view: TextViews.View;

                BEGIN

                                locator := Files.dir.This (path);

(* omitted code for checking "locator.res # 0" *)

 

                                model := TextModels.dir.New (); (* create a new, empty text object *)

                                view := TextViews.dir.New (model); (* create a new text view for model *)

                                formatter.ConnectTo (model); (* connect a formatter to the text *)

                                formatter.SetPos (0); (* set write position to beginning of file *)

 

                                WriteFile (formatter); (* now write file contents *)

                                Views.RegisterView (view, locator, name);

                END StatusFileWrite;

 

 

 

Does anybody have an idea how to solve this problem ?

Thanks in advance and best regards,

Rainer

 

 

 

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy

Vorarlberger Illwerke Aktiengesellschaft ein Unternehmen von illwerke vkw
Rechtsform: Aktiengesellschaft, Sitz: Bregenz, Firmenbuchnummer: FN 59202m
Firmenbuchgericht: LG Feldkirch, DVR 0008753, UID-Nr.: ATU 36737402

Vorarlberger Kraftwerke Aktiengesellschaft ein Unternehmen von illwerke vkw
Rechtsform: Aktiengesellschaft, Sitz: Bregenz, Firmenbuchnummer: FN58920y
Firmenbuchgericht: LG Feldkirch, DVR 0027961, UID-Nr.: ATU 36737304

P Vor dem Drucken bitte an die Umwelt denken!

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Thu May 23 2013 - 19:00:58 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:54 UTC