get specialFolderpath(26)
Rob Cozens
rcozens at pon.net
Thu Oct 17 13:25:40 EDT 2002
>when I'm designing a database library to be used & distributed by
>others, I have to provide a path to any db stack opened by the
>calling stack. So far it seems specialFolderPath is the only way to
>accomplish this, and that means files must be forced into particular
>(though generically addressed) locations on every platform...
>
>and that means an installer is needed on every platform and by every
>developer who uses my library.
>
>It's not a solution I like very much; but what's the alternative?
Hi All,
Having been underwhelmed with suggestions, here is the approach I'm evaluating:
* Maintain the full path name to the SDB database in the mainstack's
sdbFile property as in my original design
* Supplement the openSDBFile handler with logic to check (1st) the
mainstack's folder and (2nd) specialFolderPath("Documents") for the
database before requiring the user to locate or create it.
I assume specialFolderPath("Documents") returns empty for both Mac OS
9 & X, as well as all Unix platforms; so the second step only deals
with Windows permission issues. Still, the first check should
resolve the issues related to moving or renaming a folder containing
an app & db on all platforms, no?
I plan to wait a day or so before scripting the changes; so you have
about 24 hours to further educate me or blow holes in my design.
:{`)
--
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.com/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list