Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does one work and the other doesn't?
Message
 
 
To
28/10/2004 18:03:20
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 6 SP3
Miscellaneous
Thread ID:
00955582
Message ID:
00955587
Views:
15
Hi Greg,

First, there'a no need for macro substitution in this case. W/o it code is simpler and readable
cPicture = sys(5)+curdir()+'RADIOGRAPHY\'+padl(cUser,8,'0')+'\'+ ;
			ALLTRIM(EVALUATE(radio.r_image'+tran(nCounter)))
STORE cPicture TO ('thisform.imgPicture'+tran(nCounter)+'.picture')
Try code above and if it doesn't work, tell what exactly doesn't work? Do you get an error or what?

>
>I am trying to assign the name of a picture at run time based upon a selection made by the user.
>
>This code works:
>nCounter=1
>cPicture=sys(5)+curdir()+'RADIOGRAPHY\00000001\000001000006.jpg'
>cMacro='thisform.imgPicture'+tran(nCounter)+'.picture="'+cPicture+'"'
>&cMacro
>
>This code does not :-(
>nCounter=1
>cUser=1
>cPictureName='radio.r_image'+tran(nCounter)
>cPicture=allt(&cPictureName)
>cPicture=sys(5)+curdir()+'RADIOGRAPHY\'+padl(cUser,8,'0')+'\'+cPicture
>cMacro='thisform.imgPicture'+tran(nCounter)+'.picture="'+cPicture+'"'
>&cMacro
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform