Hi Kirk,
No, the Mac path does not work on Windows.
Obtaining the path to the schema document on Windows is slightly different than
on the Mac.
On the Mac, the command "Application file" returns a path to a folder (i.e.,
package.).
But on Windows, the "Application file" command returns a path to an actual file
(i.e., the executable). Both the executable and the "Resources" folder are
contained within the same folder at the same level.
The location on Windows is:
Program Files
4D
4D.exe
Resources
formsSchema.json
So get the desired path in 3-steps:
1) Specify the relative path "Resources"+Folder separator+"formsSchema.json".
2) Use the command commands "Application file" and "Path to object" to get the
parentFolder to the executable.
3) Build the actual path as "parentFolder + relativePath".
Something like this:
—
C_OBJECT($path_obj_o)
C_TEXT($path_t)
C_TEXT($relative_path_t)
$relative_path_t:="Resources"+Folder separator+"formsSchema.json"
$path_t:=Application file
$path_obj_o:=Path to object($path_t)
$path_t:=$path_obj_o.parentFolder+$relative_path_t
--
- Jeremy
> On Aug 6, 2018, at 3:54 PM, Kirk Brooks via 4D_Tech <[email protected]>
> wrote:
>
> This works on Mac:
>
> $path:=*Application file*+Folder separator+"Contents"+Folder separator
> +"Resources"+Folder separator+"formsSchema.json"
>
> Can someone verify it works on Windows too?
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************