[Help] "TrueTrue"? What does this mean?

  • Thread starter Thread starter Patrick Pirtle
  • Start date Start date
P

Patrick Pirtle

I have a small VB app (my first .NET) that creates a
couple of folders and copies some files around. I also
created a setup program for it. When I install it on
users' computers, I always try it to verify it's working
as I expect. So far, it always appears to install fine.

However, from time to time, a user will call me and
say they received this error message:

ftp://mka.com/outbox/wsg.jpg

I can't find anything in my app that appears to relate to
this--and just what could "TrueTrue" imply?

Although I'm not asking anyone to spend a lot of time
debugging my app, I've also published the entire code
to:

ftp://mka.com/outbox/WSG.zip

TIA for any help you can offer.
 
Patrick... I can't spot the line that might be causing it but it looks like
you have option explicit off ... and if you turn that on it could very well
point you to a implicit cast which is causing your problem.

There are a number of "VB6" things in the code also... not that it causes
the problem of course but it's a good idea to avoid them.

And finally... does anybody report "when" they get that error, meaning what
were they doing at the time? I'd tend to look different places if it
happened on startup, on shutdown or when a particular button was clicked.

Tom
 
Hi Patrick

I'd suggest lines 359,360 if your using VS.NET.

359 If (UCase$(Mid(curFileToCopy, 1, 4)) <> UCase$(userName) & ".") &
_
360 (UCase$(Mid(curFileToCopy, 1, 3)) <>
UCase$(userName) & ".") Then

Your error message is about casting. If you turn on Option STRICT you
will see that you are doing a lot of lazy binding. The only error that
is about string to bool is for these lines which would make sense:

Your evaluating one condition and the "&" with the evaluation of
another. Becuase of the functions you using you would get True & True
= "TrueTrue"

You cant CBool("TrueTrue"), its not valid it should be Cbool("True")
hence the error. Thats my best guess.

Always program with Option Strict On.

hth

Richard
 
I should have added that you really want to be using the "AND" or
"ANDALSO" keyword as "&" is for string concantenation, thats why your
getting a "TrueTrue" string.

Richard
 
Tom -

Many thanks for your reply. The error shows up once they
highlight an folder entry in the listbox and press the "Restore"
button. The app then tries to copy the file within the selected
folder to other locations on the disk.

The two replies following yours appear to shed additional
light on my problem, so I've got some thinks to go look at.

This whole concept of "casting" is something that I don't
understand. I did a Google search and read through various
explanations, but I guess I don't do enough consistent
programming to experience (and experiment with) it.

Well, thanks again for your suggestions.

- Patrick


Tom said:
Patrick... I can't spot the line that might be causing it but it
looks like you have option explicit off ... and if you turn that on
it could very well point you to a implicit cast which is causing your
problem.

There are a number of "VB6" things in the code also... not that it
causes the problem of course but it's a good idea to avoid them.

And finally... does anybody report "when" they get that error,
meaning what were they doing at the time? I'd tend to look different
places if it happened on startup, on shutdown or when a particular
button was clicked.
[snip]
 
Richard -

I really appreciate your responses. As suggested by Tom's reply,
it's obvious that I'm moving into .NET from VB6, and don't even
recognize those .NET concepts that should replace my VB6
techniques (not to mention subtleties(?) like those you mention
below.) Fortunately, there's always a lot to learn--Keeps life
interesting.

I'll try your suggestions. Thanks, again.

- Patrick
 
Back
Top