Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Always runs the same program

Author
Message
PeterP
21
Years of Service
User Offline
Joined: 26th Apr 2003
Location: United Kingdom
Posted: 27th Apr 2003 00:21
I've just bought DarkBasic (1.12) and installed it on my XP Home computer. We worked through the Fast Track tutorials OK, and then tried a demo program. Next, we thought to code something of our own - but every time we execute or build an exe, it runs the demo. The only way I can get away from this is to reboot the PC.

Even if I quit DB, reload it & execute without evening opening a file, it will run the 'old' program.

How do I get it to compile/run the program which is on screen?
Where does DarkBasic remember the old program / how could I clear it?

I've tried using DarkEdit as well; same effect.
Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 27th Apr 2003 07:36
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!... o_O I am the only other person in the history of DB to get that problem... I ended up reformatting my comp... try reinstalling DB... O_O it doesn't work!

AMD Athlon XP 2100+ OC to 3Ghz/1.5gigs ram/128mb ti4200/120gigs hd/19" monitor/Sound Blaster Audigy Platinum EX/3072kbs Sat Con... I joined in!
PeterP
21
Years of Service
User Offline
Joined: 26th Apr 2003
Location: United Kingdom
Posted: 27th Apr 2003 11:41
An update to my own problem:
I have multiple users set up under XP Home (one of it's advantages, but not very well implemented by MS w.r.t Win 2000 for example). This problem doesn't affect the "system manager" (the user which installed DB).
That suggests that DBs "memory" is either a file or registry setting, which the other users can't write to. If it's a registry setting, I can change its permissions. If it's a file, I'll need to hope that there is somewhere (registry setting, .ini?) which tells DB which file to use.
Anyone know where DB stores something intermediate between the source & the executable?

P
PeterP
21
Years of Service
User Offline
Joined: 26th Apr 2003
Location: United Kingdom
Posted: 27th Apr 2003 12:29
And now (it seems), the answer to my own problem x-d :
When you compile/execute a program in DarkBasic, it saves a copy of the source in C:\Windows\temp\workfile.tmp, and another in workfil2.tmp in the same folder
(this is in addition to the two backup copies created in the folder where your source is!).
(Dark Edit only creates the first of the temp files).
This path is independent of the TEMP and TMP environment variables.
The file is not deleted when Dark Basic exits.
So, unless the next user to run Dark Basic on that PC has permission to overwrite the file, he'll only be able to run your program (& therefore gets your error messages e.g. unable to load music on line 22 - most mystifying when his source is displayed & doesn't have a line 22!)
Work around: a batch file which runs Dark Edit & then deletes the temporary file. Of course, when I start more complex programs, I expect to find more temporary files needing deletion.

Preferred solution: for Dark Basic & Dark Edit to 1. delete their own temporary files; 2. use the user's TEMP environment variable to decide where to put them

Does DB work on PCs where there isn't a C:\Windows\temp? (e.g. Windows installed to a different folder; Windows NT - which defaults to c:\winnt)

P
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 27th Apr 2003 12:45
try to put the right settings in the IDE
click on Project and put in the path you want your exe be run from..
when you do new stuff you must do the following:
Save source as:
Save project as:
close and load again "project".dbpro
click on Project in the IDE and put the settings again
(project name and exe name)
reloading the .dbpro it should carry along the "project".dba saved before
from now on you only need to do the save all at every change or udate

Login to post a reply

Server time is: 2024-11-24 13:01:13
Your offset time is: 2024-11-24 13:01:13