SelectedText Error

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
montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

SelectedText Error

Post by montymay » Fri Sep 05, 2014 3:15 am

My stack has number of cards with locked fields with their list behavior set to true. The script for each field puts the selected text of each line into a variable, and then "go cd <variable>" takes the user to a card of the same name. Today, it has a persistent error: the selected text contains two spaces between each character, e.g., the word "farmer" in the field is transformed by the program into "f a r m e r," so, of course, it does not find the corresponding card named "farmer." The OS is Windows 7. An identical stack on my Windows 8.1 laptop, running under the same version of LC (6.6.2), does not have the error. Hoping there is a fix, I thank you for any suggestions.

Monty

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: SelectedText Error

Post by dunbarx » Fri Sep 05, 2014 4:54 am

Hi.

I assume you use a "mouseUp" handler in the script of each list field to get the selectedText?

Have you tried to check the contents of the field in the very first line of such a handler? Set a breakpoint, and put the full text into a variable. See what sits there, and then get the selectedText, and see if it mirrors the particular line of text you saw originally.

I don't suppose there is any little gadget that separates the chars with spaces anywhere?

Craig Newman

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm
Location: NE USA

Re: SelectedText Error

Post by WaltBrown » Fri Sep 05, 2014 8:10 am

I had the
f a r m e r
problem when I was converting to and from Unicode in variables and Unicode fields. That may be a place to start looking.
Walt Brown
Omnis traductor traditor

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”