Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bug in VFP8's code reference?

Status
Not open for further replies.

theThirdElement

Programmer
Jan 10, 2004
38
US
Hello,

While reading the latest thread about code references, my colleague is having some weird things happening with "replace" in "Code Reference". After some investigations I realised it's probably a bug in VFP's code reference program.

It looks like that if there are repeated matching phrase in a line, and as VFP replaces, it won't update the line as one replacement is done. So it'll just keep doing replacements on one after the other without realising the indices, which indicate the beginning of the matching phrases, have changed.

Example:

Create a new form, and in some method, put in

"sentence for replacement...replacement...replacement"

(without the quotes, and ignore the syntax error :) )

Then use code reference to look for the string "replacement", good, it finds it and then let's replace the string to "rep"....the code reference reports that it's done successfuly, but I get the following result after going to the code:

sentence for rep...replacemrepcementrep


There we go. Is anyone else getting the same bug? :)


Ed
 
theThirdElement,

You are indeed correct...in VFP8 I get:

sentence for rep...replacemrepcementrep

It's fairly odd since it showed the preview of what it was going to do correctly. Anyone got the VFP9 beta still installed and can try it there and post results?

boyd.gif

 
It seems to work just fine in a VFP 9.0 beta form - at least in the Comment property.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top