[PD-dev] loading classes: search by directory rather than extension

IOhannes m zmölnig zmoelnig at iem.at
Wed Sep 23 23:36:16 CEST 2015


On 09/23/2015 11:09 PM, Jonathan Wilkes via Pd-dev wrote:
> And a question to make sure I understand what you're proposing:
> Inside "foo.pd", I have a single object [bar]
> "foo.pd" lives in directory /home/blah
> The only other file in /home/blah is "bar.pd"
> Under your revision of the loading mechanism, when I load "foo.pd" is [bar] guaranteed to be loaded from /home/blah/bar.pd ?

i guess so.

however, i just checked and there *is* a way to trigger a peculiarity:

additional to your specs, consider:
- /home/fugl contains a file "bar.pd"
- /home/blah/bar.pd contains a [declare -path /home/fugl]
- /home/blah/foo.pd is saved with an instance of that (/home/blah) [bar]

THEN

-> when you load "foo.pd", the [bar] will be loaded from /home/fugl/bar.pd


that's related to the (dreaded) behaviour of [declare], that injects
declare-statements into parent patches (without corresponding objects).
i *believe* this is a bug in [declare] (and actually wanted to fix this
on the go as well, but forgot about it).

gfmasre
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20150923/60080233/attachment.sig>


More information about the Pd-dev mailing list