Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Path To Images
Message
From
07/08/2007 14:55:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01246572
Message ID:
01246582
Views:
16
If the location is variable, you might consider using a variable instead. That will save you the trouble of recompiling. Load the variable from the Registry, a text file, a DBF, etc.

>I had created a series of constants to define image locations. The images are stored in different
>locations during development, in subfolders under the Media\UI folder. In runtime, all images will
>be dumped into a single folder called 'Graphics':
>
>
>#DEFINE IMAGE_LOC_RUNTIME	ADDBS(SYS(5) + SYS(2003)) + "Graphics\"
>#DEFINE IMAGE_LOC_DEV		ADDBS(SYS(5) + SYS(2003)) + "Media\UI\"
>
>#DEFINE IMAGE_LOC_BASE   	IIF(RUNTIME, IMAGE_LOC_RUNTIME, IMAGE_LOC_DEV)
>
>#DEFINE IMAGE_LOC_EFFECTS	IIF(RUNTIME, IMAGE_LOC_BASE, IMAGE_LOC_BASE + "Effects\")
>#DEFINE IMAGE_LOC_ARROWS	IIF(RUNTIME, IMAGE_LOC_BASE, IMAGE_LOC_BASE + "Arrows\")
>
>
>Using this technique, I have been able to use a constant when assigning graphics at runtime. The
>base image location is determined by either IMAGE_LOC_RUNTIME or IMAGE_LOC_DEV.
>
>Now the requirements have changed. The base location for the images will be configurable by the
>user.
>
>So the question is, how to I implement that here without going and changing all the places I'v
>used a constant?
>
>Thanks
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform