Leading Space in Item List

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Leading Space in Item List

Post by sritcp » Thu Jan 08, 2015 11:09 pm

This is not really a question.

I was disconcerted to note that leading spaces are included in item names.
The second item of the list "B1, B2, B3, B4" is " B2" (i.e., leading space followed by B2).
Returns an error if your array element is, say, tArray["B2"].
Easy to miss, as I did today!

Regards,
Sri.

Da_Elf
Posts: 311
Joined: Sun Apr 27, 2014 2:45 am

Re: Leading Space in Item List

Post by Da_Elf » Thu Jan 08, 2015 11:33 pm

just strip out the leading spaces

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Leading Space in Item List

Post by dunbarx » Thu Jan 08, 2015 11:34 pm

Hi.

This is expected behavior. A space may look empty, but, like "0" it is full of content and meaning.

Craig

Post Reply