Page 1 of 1

Possible bug with trueWord chunks - fixed in 7.0 DP5!!

Posted: Fri May 23, 2014 2:16 pm
by Peter Wood
The trueWord chunk "after" the end of string contains the last word in the string. This is different from the corresponding word which contains an empty string.

I ran this in the message box

Code: Select all

put "The cat sat on the mat." into tText
put the sixth word of tText & return into tResult
put the seventh word of tText & return after tResult
put the sixth trueWord of tText & return after tResult
put the seventh trueWord of tText & return after tResult
put tResult
This is the result

Code: Select all

mat.

mat
mat

Re: Possible bug with trueWord chuinks

Posted: Fri May 23, 2014 2:24 pm
by Peter Wood
I have noticed that this also happens when you expect any empty chunk:

Code:

Code: Select all

put "The cat sat on the mat" into tText
put the seventh word of tText = the seventh trueWord of tText
Result:

Code: Select all

false

Re: Possible bug with trueWord chuinks

Posted: Fri May 23, 2014 2:38 pm
by livecodeali
Hi Peter,

Thanks for this, it is indeed a bug. The seventh trueWord should in fact be empty, since punctuation marks are not considered trueWords by LiveCode.

Kind regards,

Ali

http://quality.runrev.com/show_bug.cgi?id=12499

Re: Possible bug with trueWord chunks - updated

Posted: Fri May 23, 2014 2:48 pm
by Peter Wood
Thanks Ali

After reading the release notes properly, I realised that trueWords don't capture punctation and updated the first message accordingly.

Best regards

Peter