General information
Title:
101 VFP7 Things, Part 19 - TextMerge()
There's a new function called TextMerge() in VFP7, that works like this. You put in a string and it returns it back.
?TEXTMERGE('Test1') && Returns "Test1"
BUT WAIT! It gets better :-)
It also does TextMerge()s, surprisingly, for example:
?TEXTMERGE('Test1 <<_screen.Caption>>') && Returns "Test1 Microsoft Visual FoxPro"
There is another parameter that lets you recurse through until no more merges need to be done. For example, where:
lcCaption = '<<_screen.caption>>'
?TEXTMERGE('Test1 <>')
would return "Test1 <<_screen.Caption>>", this:
?TEXTMERGE('Test1 <>',.t.)
return "Test1 Microsoft VisualFoxPro", and of course:
lcCaption = '<>'
?TEXTMERGE("Test1 <>", .T.)
Would hose the entire app. Also, the 3rd and 4th parameters let you specify the beginning and ending delimiters for the merge, but I think it only lets you specify two characters for each tag, no more no less.
There's also this blip in the help: "This function ignores all non-COM object references, including references to Visual FoxPro objects." whici I can't figure out what its getting at. I've used COM properties and non-COM properties in TextMerge() and they both work fine.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only