Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


checking textbox string


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-21-2007, 06:41 PM
Senior Member
 
Join Date: May 2007
Posts: 156
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, 14 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: 611
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: 2,956
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: 1,470
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Fine for me also!
Reply With Quote
  #5 (permalink)  
Old 10-23-2007, 02:36 PM
Senior Member
 
Join Date: May 2007
Posts: 156
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: Greece
Posts: 353
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
Senior Member
 
Join Date: May 2007
Posts: 156
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.
Attached Files
File Type: sbp test.sbp (762 Bytes, 9 views)
__________________
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: 2,956
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: Greece
Posts: 353
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
Senior Member
 
Join Date: May 2007
Posts: 156
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CASE - checking for a range ? TWELVE Questions & Help Needed 2 06-21-2008 09:21 PM
Checking available fonts? MitchDabo Questions & Help Needed 5 02-10-2008 10:43 PM
String and Shell questions HARRY Questions & Help Needed 4 12-18-2007 05:56 PM
Basic string operators Rioven Questions & Help Needed 2 06-10-2007 08:24 AM
OK, next string question Stellaferox Questions & Help Needed 9 06-07-2007 01:12 PM


All times are GMT. The time now is 03:02 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0