I have written some simple stuff to make a database, I`ve posted part of the filetree, where you would load/save files.
It used to work fine, but now on my PC it chugs.. only changes are:
directX8.1 re-installed ( as I wasnt sure what version I had, so I updated)
updated GFX card drivers, as I had ( well still have ) icon colour problems.
cls : sync rate 30 : sync on
update_dir=0
`dim PATHS$(9999)
new_dir$="c:"
perform checklist for drives
dim drvs$(checklist quantity())
for a=1 to checklist quantity()
drvs$(a)=checklist string$(a)
drv_qty=a
next a
empty checklist
set dir "c:\program files"
perform checklist for files
dim filetype(checklist quantity())
dim dir$(checklist quantity())
for a=1 to checklist quantity()
dir$(a)=checklist string$(a)
dir_qty=a
next a
empty checklist
print "checklists full"
suspend for key
do
cls
counter=0
x1=80 : x2=280 : x3=310 : x4=510
y1=70 : y2=y1+15 : y3=y1 : y4=y2
find first
repeat
inc counter
REM DIRECTORIES
if get file type()=1
`gosub DIR_NAME_LEN
if mouseX()>x1 and mouseX()y1 and mouseY()0 : repeat : wait 1 : until mouseclick()=0 : cls : endif
if dir$(counter)=".."
if p>1 then dec p
`new_dir$=paths$(p)
else
inc p
new_dir$=cur_dir$+"\"+dir$(counter)
`paths$(p)=new_dir$
endif
old_dir$=cur_dir$
endif
box 80,y1,280,y2
ink rgb(15,15,15),rgb(100,180,200)
center text 180,y1,upper$(dir$(counter))
else
ink rgb(255,255,255),rgb(100,180,200)
box 80,y1,280,y2
opt=0
ink rgb(15,15,15),rgb(100,180,200)
center text 180,y1,upper$(dir$(counter))
endif
inc y1,20
inc y2,20
endif
find next
set cursor 200,40
print counter
`sync
until counter=20
sync
loop
is it posible that I could have damaged how DB runs ? as there are several of my codes that now have the same problem.
the other problem I have encountered is if I do this :
sync rate 30 : sync on
do
cls
set cursor 100,100
print "hello"
sync
loop
it wont print `hello` on the screen.
I have mentioned this before, Easily Confused suggested to use set text opaque, and remove the CLS, but in most of what I have coded, I`m not sure if that would work, ( sorry E.C, but thanks anyway
)
for some reason, my DB wont update the screen very well with CLS & SYNC in a do loop.
Any ideas ?