1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#N canvas 155 143 681 480 12;
#X msg 97 232 postpath;
#X msg 16 247 postpathx;
#X obj 76 312 lpaths;
#X msg 144 259 load;
#X msg 145 284 loadx;
#X text 12 200 postpath and load use _canvaspath \, postpathx and loadx use _loadpath:;
#X text 194 234 Here load will be the same as loadx and postpathx will be the same as postpath because the directory the help patch is in is the same as the directory that this lpaths.pd_lua is loaded from.;
#X text 208 369 This lpaths.pd_lua is loaded from the 'subdir' directory \, so postpathx and loadx will give that directory while postpath and load will still reference the directory that this help file is in.;
#X msg 101 349 postpath;
#X msg 20 364 postpathx;
#X msg 148 376 load;
#X msg 149 401 loadx;
#X obj 80 429 subdir/lpaths;
#X text 14 97 There is a copy of lpaths.pd_lua in the directory of this help patch \, and in the 'subdir' folder. There are 2 different hello.txt files with different contents in both directories \, that are loaded and printed with 'load' and 'loadx' messages \, corresponding to _canvaspath and _loadpath respectively.;
#X text 14 14 This example demonstrates the use of self._canvaspath and self._loadpath. _canvaspath will give the directory of the canvas that the object is created in \, whereas _loadpath will give the directory that the .pd_lua file is loaded from. Both have trailing slashes added for convenience.;
#X connect 0 0 2 0;
#X connect 1 0 2 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 8 0 12 0;
#X connect 9 0 12 0;
#X connect 10 0 12 0;
#X connect 11 0 12 0;
|