Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

checking textbox string

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-21-2007, 06:41 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Question checking textbox string



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 +

Attached Files
File Type: sbp test.sbp (521 Bytes, 16 views)
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #2 (permalink)  
Old 10-21-2007, 07:12 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

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 by specci48 : 10-21-2007 at 07:14 PM.
Reply With Quote
  #3 (permalink)  
Old 10-21-2007, 08:24 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I've checked it also and it works fine.
Reply With Quote
  #4 (permalink)  
Old 10-22-2007, 08:39 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Fine for me also!
Reply With Quote
  #5 (permalink)  
Old 10-23-2007, 02:36 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default 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.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #6 (permalink)  
Old 10-23-2007, 07:36 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hi,

What about StrLength(textbox1.Text)?
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #7 (permalink)  
Old 10-25-2007, 08:24 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

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.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #8 (permalink)  
Old 10-25-2007, 08:42 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I don't see this problem when I test it.
Please add:
Msgbox(StrLength(textbox1.Text))
before the condition statement and check the initial value.
Reply With Quote
  #9 (permalink)  
Old 10-25-2007, 10:41 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Very strange.
Try also at App_Start or somewhere else textbox1.text = ""
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #10 (permalink)  
Old 10-25-2007, 11:20 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 978
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default 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.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking if registry key exists? N1c0_ds Questions (Windows Mobile) 3 10-21-2008 05:30 AM
Long String Georg Questions (Windows Mobile) 2 08-06-2008 08:20 AM
CASE - checking for a range ? TWELVE Questions (Windows Mobile) 1 06-21-2008 08:00 PM
Checking available fonts? MitchDabo Questions (Windows Mobile) 5 02-10-2008 10:43 PM
OK, next string question Stellaferox Questions (Windows Mobile) 9 06-07-2007 01:12 PM


All times are GMT. The time now is 05:35 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0