VXCMD - Can't Create DB in Windows - FYI

Ron rbarber at yhb.att.ne.jp
Tue Aug 19 12:45:41 CDT 2003


Hi Ken, Ruslan

>> 
>> So if I have correctly understand, must be updated example in
>> the archive of VXCMD_WIN.
>> 
>> I have copy it directly from MAC archive last time.
>> 
>> Interesting if it is possible to write nativePath() once that
>> will work for each platform?
> 
> Sure... you already have the "switch" statement in there, you only need
> to do something like this:
> 
> function nativePath thePath
> switch (the platform)
> case "MacOS"
> delete char 1 of thePath
> replace "/" with ":" in thePath
> break
> case "Win32"
> replace "/" with "\" in thePath
> break
> end switch
> end nativePath
> 
> 
Ken, does the above function work for OS X as well? I use the one below that
also appends another folder, of course that would not be necessary, it was
just the way I have it set up (and the second part sets the externals).

put char 1 of the systemversion into systemchecker

if systemchecker is a number then
    if systemchecker <8 then ---OSX
      put defaultfolder&"/Data/" into valpath
    else
      put the defaultfolder&":Data:" into valpath
      delete char 1 of valpath
      replace "/" with ":" in valpath
    end if
  else
    put the defaultfolder&"/Data/" into valpath
    replace "/" with "\" in valpath
  end if

if systemchecker is a number then
    if systemchecker > 7 then
    else
      set the externals of this stack to "./VXCMD_Macho"
    end if
  else
    set the externals of this stack to "./VXCMD.DLL"
  end if


Thanks
Ron



More information about the Valentina mailing list