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

Discussion about LiveCode Global Jam events and activities

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Locked
Peter Wood
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 92
Joined: Mon Jul 06, 2009 4:53 am
Location: Bamboo River

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

Post by Peter Wood » Fri May 23, 2014 2:16 pm

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
Last edited by Peter Wood on Sat May 24, 2014 2:52 am, edited 4 times in total.

Peter Wood
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 92
Joined: Mon Jul 06, 2009 4:53 am
Location: Bamboo River

Re: Possible bug with trueWord chuinks

Post by Peter Wood » Fri May 23, 2014 2:24 pm

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

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 192
Joined: Thu Apr 18, 2013 2:48 pm

Re: Possible bug with trueWord chuinks

Post by livecodeali » Fri May 23, 2014 2:38 pm

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

Peter Wood
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 92
Joined: Mon Jul 06, 2009 4:53 am
Location: Bamboo River

Re: Possible bug with trueWord chunks - updated

Post by Peter Wood » Fri May 23, 2014 2:48 pm

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

Locked

Return to “LiveCode Global Jam”