Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfpscripting in VFP6SP5 - it works but why??
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
ActiveVFP
Divers
Thread ID:
00785717
Message ID:
00787123
Vues:
16
Looks like you're right as far as the vfp6t.dll. In AVFP, CodeBlock is actually evaluating the text - so CodeBlock is either adding this functionality or ignoring it because it doesn't need it. It's a little complicated but here's the basic code that works in VFP6SP5:
lcStr = STRTRAN(lcStr,"< %",CHR(13)+"ENDTEXT"+CHR(13))
cEval = "PRIVATE strVar"+CHR(13)+"TEXT TO strVar TEXTMERGE NOSHOW"+CHR(13);
 + STRTRAN(lcStr,"%>",CHR(13)+"TEXT TO strVar TEXTMERGE NOSHOW ADDITIVE"+CHR(13)) + ;
                CHR(13)+"ENDTEXT"+CHR(13)+"RETURN strVar"  
           
oCodeBlock = CREATEOBJECT( "cusCodeBlock") 
oCodeBlock.SetCodeBlock(cEval) 
oCodeBlock.lAccumulateMergedText = .T.
SET TEXTMERGE ON
oCodeBlock.Execute() 
lcStr=oCodeBlock.GetMergedText()
RETURN lcStr
It's taking the VFP code between
< %%>
delims in an html file and adding it to a string and executing it at the end. (had to put a space in < % above because ut is messing up code - there should be no space)
>Hi Claude,
>
>I doubt that. Can you verify that you're running VFP6 mtdll by including code like following in your mtdll.
lcVar = ""
>TEXT TO lcVar NOSHOW TEXTMERGE
><<VERSION()>>
>ENDTEXT
>STRTOFILE(lcVar, ...)
>
>
>>Amazingly, it looks like vfpscripting works in vfp6sp5 using
>>TEXT command (TEXT TO [ADDITIVE] TEXTMERGE NOSHOW)in a vfp mtdll.
>>As you may know, the new clauses were enhancements in VFP 7. It doesn't work in regular VFP6SP5 or interactive, so, I guess MS just threw it into the VFP6t.dll for vfp mtdlls - unless I'm missing something...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform