Blitz (39/81)

From:Gareth Griffiths
Date:11 Mar 2001 at 15:19:31
Subject:Variable problem.

Hi all,

I've got a bit of a problem with my code. Its really strange though, and
I'm positive it shouldn't be happening!

A snippet of the code follows:

tmp$=""
If req=0
tmp$=ASLPathRequest$("Select input directory...",p$)
If tmp$<>""
If NOT Exists(tmp$)
MUIRequest #MAINWIN,0,"Error","OK",tmp$+": Does not exist."
Else
If Right$(tmp$,1)=":" OR Right$(tmp$,1)="/"
dir$=tmp$
Else
tmp$=tmp$+"/"
dir$=tmp$
EndIf
EndIf
EndIf
EndIf

The tmp$+ bit in the MUIRequest command is just for debugging purposes, to
find out whats going on. Basically, the first time the program is run, I
select a directory and tmp$ equals (for example) "MP3:A" which when the
code is executed is put into dir$ and changed to "MP3:A/"

The second time I do it, and select "MP3:" as the directory in the
requester, tmp$ equals "MP3:MP3:A/" (so its adding the old contents of tmp$
on to it, and therefore the MUIRequest code is executed.

Surely this shouldn't be happening if there is a tmp$="" line at the very
top?

I'm probably overlooking something really obvious, but I can't find
anything wrong. Please help!

Gaz.



Gareth Griffiths - mailto:mail@gazchap.com - http://www.gazchap.com
"Welease Woderick!" - Monty Python's "The Life of Brian".

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list/-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list/-help@netsoc.ucd.ie