<div dir="ltr"><div><div>Actually currently the paths are searched as follows (for [declare -path] paths):<br>- searchpaths declared locally in the abstraction<b> applied to the topmost patch's directory</b><br>
- searchpaths declared in the containing abstraction<b> applied to the topmost patch's directory</b><br>
- searchpaths declared in the grandparent abstraction<b> applied to the topmost patch's directory</b><br>- ...<br><br></div>I've proposed a patch that would search:<br>- searchpaths declared locally in the abstraction <b>applied to the abstraction's directory then</b> to the topmost patch's directory<br>
- searchpaths declared in the containing abstraction <b>applied to the </b><b>containing abstraction's directory then</b> to the topmost patch's directory<br>
- searchpaths declared in the grandparent abstraction <b>applied to the grandparent abstraction's directory then</b> to the topmost patch's directory<br>- ...<br><br></div>This would allow to harmlessly turn a top-level patch into an abstraction (e.g located in another directory than caller's one), even if it uses [declare]s.<br><div><div><br><br>
</div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><font face="arial, helvetica, sans-serif"> Antoine Rousseau </font></div><div dir="ltr"><font face="arial, helvetica, sans-serif">  <a href="http://metalu.net" target="_blank">http://www.metalu.net</a> __ <a href="http://www.metaluachahuter.com/compagnies/al1-ant1/" target="_blank">http://www.metaluachahuter.com/</a><br><br></font></div></div></div></div></div></div>
<br><div class="gmail_quote">2017-01-05 16:14 GMT+01:00 IOhannes m zmoelnig <span dir="ltr"><<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2017-01-05 12:50, <a href="mailto:rolfm@dds.nl">rolfm@dds.nl</a> wrote:<br>
><br>
> however, the libs which are declared in the main patch (when loaded) are<br>
> not available in this new window.<br>
<br>
</span>the only way this makes sense to me is if with "libs" you mean "paths"<br>
(to abstractions).<br>
traditional libraries (binary files containing one or more objects) will<br>
be loaded into global namespace.<br>
<br>
with the "libdir" loader, the distinction has (unfortunately) become blurry.<br>
<span class=""><br>
> is there a design reason for this?<br>
<br>
</span>the paths are searched as follows:<br>
- searchpaths declared locally in the abstraction<br>
- searchpaths declared in the containing abstraction<br>
- searchpaths declared in the grandparent abstraction<br>
- ...<br>
- global searchpaths (preferences/startup-flags)<br>
<br>
<br>
in your example you have two top-level patches: "the big main window"<br>
and the newly created window.<br>
since they are unrelated, they don't share any paths declared in any of<br>
them.<br>
<br>
this is of course by design, and is inspired by module loading in other<br>
languages. (e.g. "import" in python)<br>
<br>
fgmsdr<br>
<span class="HOEnZb"><font color="#888888">IOhannes<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
<br></blockquote></div><br></div>