<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div><div class="h5"><div><blockquote type="cite">

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div><div><div><blockquote type="cite">

<br><div class="gmail_quote">2010/11/30 Hans-Christoph Steiner <span dir="ltr">&lt;<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>&gt;</span><br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

 <div style="word-wrap: break-word;"><div><br></div><div>I cc&#39;ed the Pd-list since I think this is relevent there.</div> <br><div><div><div>On Nov 29, 2010, at 8:40 PM, András Murányi wrote:</div><blockquote type="cite">

 <font color="#000000"><br></font><div class="gmail_quote">2010/11/29 András Murányi <span dir="ltr">&lt;<a href="mailto:muranyia@gmail.com" target="_blank">muranyia@gmail.com</a>&gt;</span><br> <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  Hello HC,<br><br>i was just trying to pick this up, but i&#39;m kinda confused with the new startup order. It seems at the moment of load_startup_plugins(), which is by the end of pdtk_pd_startup() we don&#39;t yet have a functional ::pdwindow::verbose to print on the console. (Also, the &#39;---done with main---&#39; message at the end of main doesn&#39;t appear on my console.) </blockquote>

   <div><br>Do you have an idea on this?<br></div></div></blockquote><div><br></div></div><div>the &quot;done with main&quot; thing was just a debug message.  So the verbose proc doesn&#39;t work in a plugin?</div></div>
</div>
  </blockquote><div><br>it doesn&#39;t - and imo it&#39;s strange that it doesn&#39;t work at the end of main{} either<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  <div style="word-wrap: break-word;"><div><div><br><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  <br>Plus (i couldn&#39;t go into it, but) it seems to me that startup plugins are run twice.<br> </blockquote><div><br>It seems this is because both $::sys_searchpath and $::sys_staticpath contains ~/pd-externals (where i keep these plugins). Is it my error that i&#39;ve added it once to my patch list or is it like this for everyone? And - do you think a mechanism to prevent loading a plugin more than once is necessary?<br>

   </div></div><br><br></blockquote></div></div><div><br></div><br><div>Sounds like you have ~/pd-externals added as a path via the preferences.  Its now part of the hard-coded sys_staticpath.</div><div><br></div></div></blockquote>

  <div><br>Yes, that&#39;s the situation. I&#39;m just worried that other people may have &#39;double&#39; entries too, which could cause all kinds of weirdnesses in the future, not only with plugins. One of the following methods could be implemented:<br>

  a) When sys_searchpath and sys_staticpath are concatenated (or even before) we filter out double entries<br>b) We don&#39;t let the user add a folder to sys_searchpath which is already in  sys_staticpath<br>c) We just make sure that load_startup_plugins{} doesn&#39;t load the same plugin twice<br>

  I&#39;d recommend a)<br></div></div><br>Andras<br></blockquote></div><br></div></div><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>

 That is a good point.  I guess a) makes sense.</div></span></div></div></blockquote><div><br>treating only load_plugin_script{} could be done with something like this:<br>pd-gui.tcl:625<br>&lt;&lt; foreach pathdir [concat $::sys_searchpath $::sys_staticpath] {<br>

 &gt;&gt; foreach pathdir [lsort -unique [concat $::sys_searchpath $::sys_staticpath]] {<br>but i guess the C code uses the pathes often, too? then it would be better to unite them into a dupe-less single variable there, and use that everywhere<br>

  </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>

 <br></div><div>For c) I guess there should be some kind of array that stores the full path of a particular plugin once its been loaded, so then we can check and prevent double-loading.  </div><div><br></div></span></div>

 </div> </blockquote><div><br>...or plugins could check their objects are unused but i say let the &#39;server&#39; do the check rather than the &#39;client&#39;<br></div></div></blockquote></div><div><br></div></div></div>

hehe, this is sounding good right now, let&#39;s wait and see what happens, and then fix according to the problems that arise. :-)<div><br></div><div>.hc<br><div> <span style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">

<br></div></span></div></div></div></blockquote><div><br>Pif (French cartoon) would say: &quot;ONF!&quot; :o)<br></div><br>Andras<br>
</div>