#N canvas 514 170 1087 588 12;
#X declare;
#X obj 53 14 declare;
#X text 120 15 - set environment for loading patch;
#X text 30 283 -lib;
#X text 30 300 -stdlib;
#X text 30 247 -path;
#X text 30 264 -stdpath;
#X text 574 495 BUG: The name "-stdpath" is confusing \, as it has
a quite different effect from "-stdpath" on the pd command line.,
f 66;
#X text 559 394 WARNING: as of version 0.47 \, "declare -path" and
"declare -stdpath" inside abstractions take effect only within those
abstractions. If Pd's compatibility version is set to 0.46 or earlier
the old (buggy) behavior takes effect., f 47;
#X text 118 247 add to search path \, relative to the patch or user
paths;
#X text 118 283 load a library \, relative to the patch or user paths
;
#X text 29 372 For instance \, if you put abstractions and/or other
supporting files in a subdirectory "more" \, you can put an object
"declare -path more" to make sure Pd sees them when the patch is loaded.
Or \, if you have files installed in the directory extra/stillmore
(in the Pd installation) you can get it using "declare -stdpath stillmore".
, f 68;
#X text 118 265 add to search path \, relative to Pd (the 'extra' folder)
;
#X text 118 300 load a library \, relative to Pd (the 'extra' folder)
;
#X text 863 542 updated for Pd version 0.52;
#X text 546 97 It is a current best practice to just use [declare]
instead of permanently adding paths to the user search paths or libs
to startup. With [declare] you can better manage and avoid conflicts
with externals from different libraries that have the same name by
using it to call the right library you want., f 74;
#X obj 700 311 bng 18 250 50 0 empty empty empty 17 7 0 10 #ffffff
#000000 #000000;
#X text 730 309 <= click to open Pd's manual \, chapter 4, f 21;
#X text 29 333 (For any of these you may use a full pathname such as
"/tmp/dir" or \, in Windows \, "C:/garbage" instead of a relative path).
, f 68;
#X text 29 452 Paths declared with '-path' will have top search priority.
Next priority is the relative path \, then user added search paths
(set in "Preferences => Path") and finally the standard path (a.k.a
the 'extra' folder). As of version 0.49 \, "declare -path" and "declare
-lib" will fall back the other search paths if the relative path to
the patch does not exist. To avoid checking further \, use an explicit
relative path by prepending "./" or "../" to the path or lib name.
, f 68;
#X text 546 30 Since the 'extra' folder is the last in the search priority
\, other paths are searched before. You can use [declare -stdpath ./]
to ensure that 'extra' has search priority. Note that the order you
specify '-path' flags also specify the search priority., f 74;
#N canvas 798 148 456 264 open-manual 0;
#X obj 101 59 inlet;
#X obj 101 190 pdcontrol;
#X obj 101 130 pdcontrol;
#X msg 101 105 dir;
#X msg 101 159 browse \$1/../1.manual/x4.htm;
#X text 205 94 this window opens the html manual link via the [pdcontrol]
object., f 25;
#X connect 0 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X restore 700 353 pd open-manual;
#X msg 907 442 \; pd compatibility \$1;
#X msg 907 381 0.46;
#X text 947 383 earlier (buggy);
#X msg 917 410 0.47;
#X text 955 411 new (correct);
#X text 27 44 Compiled external libraries come either as a single binary
pack (the "classic" library format) or as a set of separate binaries
and/or abstractions. A single binary pack is what we refer to as a
'library' and needs to be pre loaded - whereas external libraries that
have separate binaries/abstractions can be loaded by simply adding
its directory to the search path. Adding a directory to the path is
also needed if you want to load things like audio and text files that
are in it., f 69;
#X text 27 170 A declare object adds one or more directories to the
search path and/or pre-loads one or more libraries ("externals") to
Pd in preparation for opening the patch from a file. The usage is "declare
[-flag value] [-flag value] ..." where the flag can be:, f 69;
#X text 546 172 However \, note that when you load a library (with
'declare -lib' or via startup) \, all of its objects get pre loaded
and prevail \, so using 'declare -path' cannot enforce loading priority.
Hence \, you may neeed to adopt slash declarations as in [library/objectname].
Also Note that while '-path' will only add search paths for the patch
that owns the [declare] object \, once a library is loaded \, it stays
with Pd and will be able to be loaded in other patches without [declare].
For more details on this and how external loading works in Pd \, please
refer to the chapter 4 of Pd's manual., f 74;
#X connect 15 0 20 0;
#X connect 22 0 21 0;
#X connect 24 0 21 0;
