KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Coding an image path for cross platform compatibility
PRODUCT: 4D | VERSION: 13.0 | PLATFORM: Mac & Win
Published On: April 8, 2012

When working form objects such as 3D Buttons and Picture Buttons, the images can be located in the picture library or in the Resources folder located next to the database structure file. When using the option to store the images in the Resources folder care must be taken to make sure the images will be visible on both Macs and Windows.

If the database is developed on a Mac, a file path to the images as shown in the image below will display the images in the form object while on a Mac but will not display the images when the database is deployed on Windows.



If the database is developed on Windows, a file path to the images as shown in the image below will display the images in the form object while on Windows but will not display the images when the database is deployed on Mac OS.



Regardless of the OS the database is developed and deployed, a file path using the POSIX path delimiter, "/", to the images as shown in the image below will display the images regardless of the deployment SOS.