Martin -
yes, I'm using USERFOLDERS for portability as well. I also use
my definition in conjunction with adding my own entries to the
PUBLIC_j_ global so I can use single words to alias my own scripts,
e.g. I can use
load 'dhmutils'
instead of
load '[some path]dhmutils.ijs'
Maybe there's a better way to do this? I've already run into problems
posting code that relies on my own utility libraries.
In any case, I handle USERFOLDERS by having the following in
my personal config.ijs:
USERFOLDERS=: ".&.><;._1&>';',&.><;._2 ] 0 : 0
'Projects';'c:\program files\j601\user\projects';0
'User';'C:\amisc\Jsys\User';0
'System';'c:\program files\j601\system';0
'Addons';'c:\program files\j601\addons';0
'Classes';'c:\program files\j601\system\classes';0
'Examples';'c:\program files\j601\system\examples';0
'Extras';'c:\program files\j601\system\extras';0
'Help';'c:\program files\j601\system\extras\help';0
'Main';'c:\program files\j601\system\main';0
'Packages';'c:\program files\j601\system\packages';0
'Phrases';'c:\program files\j601\system\examples\phrases';0
)
This is more-or-less a copy (with my own value for "User") from what's
in the standard config.ijs with the significant difference that the
standard definition doesn't include the "cut" logic before the "0 : 0" -
it defines a simple text vector which gets turned into the 3-column table
elsewhere - not sure why it doesn't get set at initialization.
Anyway, Chris makes a good point - it may, in fact make sense to
keep your own copy of this, especially when it differs from the
standard one.
Regards,
Devon
On 5/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Chris Burke wrote:
>If you build scripts in Jwd for running in jconsole, then these should
>not refer to USERFOLDERS. If you really need such references, then
>include them explicitly in the target scripts or in the console startup
>script, startup_console.ijs.
I share code between myself and my clients. Projects reside in
different paths at different sites/computers. USERFOLDERS is a way
(as far as I am aware the only way) to abstract from this system
dependency and to write portable code. Absolut paths anyware are
unportable, also in target scripts. To maintain USERFOLDERS twice
seems silly to me. Please make it usable independently of the
wd/console issue.
Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm