ClickText function and punctuation

Bill Vlahos bvlahos at mac.com
Sat May 19 15:19:25 EDT 2012


Mike,

Excellent. That works.

Thank you,
Bill Vlahos

On May 19, 2012, at 11:59 AM, Mike Bonner wrote:

> If you use clickchunk rather than selectedchunk the space issue goes away.
> (no chunk returned when clicking space)
> 
> On Sat, May 19, 2012 at 12:57 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> 
>> Doh, you said locked field, but it should work either way.
>> 
>> Yep, just tested and the same code works for both locked and unlocked.
>> Only thing is, if the intervening space is clicked the following word is
>> returned so you might need to check for this case.
>> 
>> 
>> On Sat, May 19, 2012 at 12:54 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>> 
>>> On an unlocked text field I tried this:
>>> 
>>> on selectionchanged
>>> put word (the number of words in char 1 to (word 2 of the selectedchunk)
>>> of field 1) of field 1 into field 2
>>> end selectionchanged
>>> 
>>> And it works fine.
>>> 
>>> On Sat, May 19, 2012 at 12:36 PM, Bill Vlahos <bvlahos at mac.com> wrote:
>>> 
>>>> Words are defined by LiveCode to include punctuation.
>>>>       put word 2 of "the check-up is good" returns "check-up"
>>>> 
>>>> The clickText function doesn't include punctuation in the word.
>>>>       If you put the phrase "the check-up is good" in a locked field,
>>>> clickText only returns either "check" or "up" depending on which part is
>>>> clicked.
>>>> 
>>>> How do I include punctuation in the entire word the user clicks on?
>>>>       In this example I want "check-up" returned
>>>> 
>>>> Bill Vlahos
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>> 
>>> 
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list