comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Reading data from file
Date: Sat, 8 Mar 2014 07:56:58 +0100
Date: 2014-03-08T07:56:58+01:00	[thread overview]
Message-ID: <1c0ut34zkn6ik.ozor88pk1lyl.dlg@40tude.net> (raw)
In-Reply-To: d5563348-6c40-4dd9-8860-e6edb01c6824@googlegroups.com

On Fri, 7 Mar 2014 13:55:41 -0800 (PST), Laurent wrote:

> While building my procedure to read data from
> a text file I had a few endless loops which blocked
> GPS completely. Got spinning ball of death and I had
> to force quit GPS. So I had no possibility to see my
> text to find out where it loops.

I suppose it is under Windows and you doing much output. That is not
entirely GPS' fault, it is the GTK text view widget GPS uses to show the
program's output. Since GTK is single-threaded and event-driven a steady
flow of output from an infinite loop chokes all GPS.

But you don't need to kill the GPS, you do your program instead from the
task manager. That will cut flooding the messages loop and GPS will respond
again.

> I tried to open my binary app which displayed the text.
> But when it arrives at the place where it should read the
> text file it raises:
> 
> raised ADA.IO_EXCEPTIONS.NAME_ERROR : Datafile.txt: No such file or directory
> 
> Now that I have found the error of the endless loops 
> and everything works as it should in GPS.
> 
> But the application still raises this error.
> 
> The txt file is in the folder with the dab/adses, the
> application is in the build folder:
> 
> Source Folder/Datafile.txt
> Source Folder/Build/My_Application
> 
> Quite useless application if it doesn't
> work without GPS.
> 
> How can I solve this?

By passing a correct file name to your application, of course. If the
application execution folder and the file folder are different you must use
the full path.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-03-08  6:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04  9:46 Reading data from file Laurent
2014-03-04 16:17 ` adambeneschan
2014-03-04 18:08 ` Mike H
2014-03-04 21:27   ` Laurent
2014-03-04 21:35     ` Laurent
2014-03-04 21:42     ` Niklas Holsti
2014-03-05 13:59     ` Mike H
2014-03-05 20:33       ` Laurent
2014-03-05 21:00         ` Jeffrey Carter
2014-03-05 21:13           ` Laurent
2014-03-05 21:25             ` Niklas Holsti
2014-03-05 21:56               ` Laurent
2014-03-06  8:35                 ` Dmitry A. Kazakov
2014-03-07 21:55                   ` Laurent
2014-03-08  6:56                     ` Dmitry A. Kazakov [this message]
2014-03-08 21:21                       ` Laurent
2014-03-09 22:39                         ` Laurent
2014-03-10  2:42                           ` Jeffrey Carter
2014-03-11 20:54                             ` Laurent
2014-03-08  9:00                     ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox