<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 30, 2010, at 4:54 PM, András Murányi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">2010/11/30 Hans-Christoph Steiner <span dir="ltr">&lt;<a href="mailto:hans@at.or.at">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><div></div><div class="h5"><br><div><div>On Nov 30, 2010, at 2:28 PM, András Murányi wrote:</div><br><blockquote type="cite"><br><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'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'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't yet have a functional ::pdwindow::verbose to print on the console. (Also, the '---done with main---' message at the end of main doesn'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 "done with main" thing was just a debug message. &nbsp;So the verbose proc doesn't work in a plugin?</div></div></div>  </blockquote><div><br>it doesn't - and imo it's strange that it doesn't work at the end of main{} either<br>&nbsp;</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'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'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. &nbsp;Its now part of the hard-coded sys_staticpath.</div><div><br></div></div></blockquote>  <div><br>Yes, that's the situation. I'm just worried that other people may have 'double' 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'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't load the same plugin twice<br>  I'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. &nbsp;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> &nbsp;</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. &nbsp;</div><div><br></div></span></div> </div> </blockquote><div><br>...or plugins could check their objects are unused but i say let the 'server' do the check rather than the 'client'<br></div></div></blockquote></div><div><br></div>hehe, this is sounding good right now, let's wait and see what happens, and then fix according to the problems that arise. :-)<div><br></div><div>.hc<br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 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-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><br class="Apple-interchange-newline"><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div>----------------------------------------------------------------------------</div><div><br class="khtml-block-placeholder"></div><div>You can't steal a gift. Bird gave the world his music, and if you can hear it, you can have it. - Dizzy Gillespie</div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></div></span> </div><br></div></body></html>