New topic: 

So I can't output a string's length to a string?

<http://forums.realsoftware.com/viewtopic.php?t=47905>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        timehacker11          Post subject: So I can't output a string's 
length to a string?Posted: Fri May 17, 2013 4:14 am                         
Joined: Sat Apr 20, 2013 7:41 pm
Posts: 35                if textfield1.text.len = 0 then
MsgBox "no string detected"
else
dim a as string = textfield1.text
msgbox "length: " + a.len

In just about any other language you can:

if string.length = 0 then
alert here
else
string1.text = string.length.tostring
end if.      
_________________
Xojo Countdown:
http://timehacker11.com/apps/countdowns/xojo/  
                             Top                shaosean          Post subject: 
Re: So I can't output a string's length to a string?Posted: Fri May 17, 2013 
4:28 am                         
Joined: Mon Aug 15, 2011 10:25 pm
Posts: 283                if textfield1.text.len = 0 then
  MsgBox "no string detected"
else
  dim a as string = textfield1.text
  msgbox "length: " + str(a.len) ' you need the str()
end if
      
_________________
Real Studio 2012r1.1 | MacBook Pro i5, 10.6.8 | Windows 7  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to