checking textbox string

derez

Expert
Licensed User
Longtime User
:sign0085:

Hi
I am puzzled by an inconsistency between the device and the desktop.
I attach a small program to demonstrae it.
when pressing the button, I check a textbox text if it is empty and if yes - put minus, else plus:

If textbox1.Text = "" Then textbox1.Text = "-" Else textbox1.Text = "+"

when run on desktop it works, on the device I always get +

:sign0163:
 

Attachments

  • test.sbp
    521 bytes · Views: 184

specci48

Well-Known Member
Licensed User
Longtime User
Hm ... your code works fine on my wm5 device ...
Are you sure you haven't got a space as a default value for the textbox on the device?
 
Last edited:

derez

Expert
Licensed User
Longtime User
textbox

Must be something wrong in my installed Basic4ppc.
I was confronted with the problem in an application that I work on, and built this small program to check it, and in both the same problem.

Anyway, I went around it with a flag instead of checking the textbox.

Thanks to all of you.
 

derez

Expert
Licensed User
Longtime User
Dzt

Of course this looks as a nice go-around, but amazingly it doesn't work.
I modified the test program, the sequence that should be written in the textbox is "-+++" using either button.
This is ok on the desktop but on the device - nothing is written !
I checked it on another MIO350 - the same result.
 

derez

Expert
Licensed User
Longtime User
textbox

Erel - Your guess was right, the length is 1 !
I checked by ASC() and it is 0 (zero)

dzt - what you suggested did not change the situation

I checked the same code on a control button instead of textbox - it works fine.
 

derez

Expert
Licensed User
Longtime User
Erel

I tried playing with the Hebrew (without disabling it completely) - no success.
Anyway - knowing about it is almost like solving it, since I use other ways for the code.

thanks

by the way - have you looked at the email from yesterday about the lost colors ?
 

derez

Expert
Licensed User
Longtime User
colors

Erel

I'm at work and can't see that email account, but your answer makes me feel very stupid, I should have thought about it myself !:signOops:

Thank you very much !:sign0098:
 
Top