<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1456765191207_3566"><span>I think this can be done with Pd-l2ork.</span></div><div id="yui_3_16_0_1_1456765191207_3709"><br><span></span></div><div id="yui_3_16_0_1_1456765191207_3838"><span>[find(</span></div><div id="yui_3_16_0_1_1456765191207_3839"><span>|</span></div><div id="yui_3_16_0_1_1456765191207_3852"><span>[canvasinfo]</span></div><div id="yui_3_16_0_1_1456765191207_3853"><br><span></span></div><div id="yui_3_16_0_1_1456765191207_3855"><span id="yui_3_16_0_1_1456765191207_3854">This will return a list of pointers to all the objects on the parent canvas.  For each one you can send the pointer to the right <br></span></div><div id="yui_3_16_0_1_1456765191207_3856" dir="ltr"><span>inlet of [objectinfo] and do this:</span></div><div id="yui_3_16_0_1_1456765191207_4001" dir="ltr"><br><span></span></div><div id="yui_3_16_0_1_1456765191207_4037" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7646">[class(</span></div><div id="yui_3_16_0_1_1456765191207_4038" dir="ltr"><span>|</span></div><div id="yui_3_16_0_1_1456765191207_4039" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7645">[objectinfo]</span></div><div id="yui_3_16_0_1_1456765191207_4082" dir="ltr"><br><span></span></div><div id="yui_3_16_0_1_1456765191207_4201" dir="ltr"><span id="yui_3_16_0_1_1456765191207_4200">I also have [classinfo].  Now, there's a special "objectmaker" class in Pd that has a method for each "creator" symbol for <br></span></div><div id="yui_3_16_0_1_1456765191207_4243" dir="ltr"><span id="yui_3_16_0_1_1456765191207_4242">every loaded Pd class.  I have a method for returning those methods, though I can't remember what it is atm and I'm not in front <br></span></div><div id="yui_3_16_0_1_1456765191207_4285" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7643">of a machine running Pd.<br></span></div><div id="yui_3_16_0_1_1456765191207_4376" dir="ltr"><br><span></span></div><div id="yui_3_16_0_1_1456765191207_4377" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7644">Putting that altogether, you can:</span></div><div id="yui_3_16_0_1_1456765191207_4550" dir="ltr"><span id="yui_3_16_0_1_1456765191207_4549">1. Run Pd-l2ork with no externals loaded, and walk the "objectmaker" methods using [classinfo].  This will give you a list of symbols <br></span></div><div id="yui_3_16_0_1_1456765191207_7648" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7647">that are essentially the class names and aliases for "core" Pd.  (Plus some other stuff that we can ignore for the moment.)</span></div><div id="yui_3_16_0_1_1456765191207_7649" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7650">2. Save that list of symbols in an abstraction.</span></div><div id="yui_3_16_0_1_1456765191207_7652" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7651">3. Run Pd-l2ork with all externals loaded, and load an arbitrary patch.</span></div><div id="yui_3_16_0_1_1456765191207_7654" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7653">4. Use [find(---[canvasinfo1] inside your abstraction to get a list of the objects on the parent.</span></div><div id="yui_3_16_0_1_1456765191207_7656" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7655">5. Use [class(--[objectinfo] to get the class of each object</span></div><div id="yui_3_16_0_1_1456765191207_7658" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7657">6. Compare that class to your list of "core" classes from #1 above.  If it matches it's a "core" object.  If not, it's an external.</span></div><div dir="ltr"><br><span id="yui_3_16_0_1_1456765191207_7657"></span></div><div id="yui_3_16_0_1_1456765191207_7712" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7657">Caveats:</span></div><div id="yui_3_16_0_1_1456765191207_7761" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7657">1. For Pd Vanilla objects, you probably need to manually prune the internal objects that have been added in Pd-l2ork-- <br></span></div><div id="yui_3_16_0_1_1456765191207_7811" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7657">preset_hub, preset_node, and my introspection classes above.</span></div><div id="yui_3_16_0_1_1456765191207_7812" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7657">2. I can't remember if I have a way to drill down into a subpatch or abstraction with [canvasinfo].  But I can add that.<br></span></div><div id="yui_3_16_0_1_1456765191207_8135" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7657">3. For externals that try to override internal objects, all bets are off.  (But there may be a way to check for that, too.)</span></div><div id="yui_3_16_0_1_1456765191207_8134" dir="ltr"><br></div><div id="yui_3_16_0_1_1456765191207_8360" dir="ltr">I'll try coding it up later.</div><div id="yui_3_16_0_1_1456765191207_8416" dir="ltr"><br></div><div id="yui_3_16_0_1_1456765191207_8417" dir="ltr">-Jonathan<br><span id="yui_3_16_0_1_1456765191207_7657"></span></div><div id="yui_3_16_0_1_1456765191207_8133" dir="ltr"><span id="yui_3_16_0_1_1456765191207_7657"><br></span></div><div id="yui_3_16_0_1_1456765191207_7659" dir="ltr"><span></span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> On Monday, February 29, 2016 9:46 AM, Alessio Degani via Pd-list <pd-list@lists.iem.at> wrote:<br></font></div>  <br><br> <div class="y_msg_container">On 29/02/2016 12:11, cyrille henry wrote:<br clear="none">><br clear="none">><br clear="none">> Le 28/02/2016 20:25, Alessio Degani via Pd-list a écrit :<br clear="none">>> Hi Cyrille,<br clear="none">>><br clear="none">>> On 28/02/2016 14:14, cyrille henry wrote:<br clear="none">>><br clear="none">>>> this is certainly possible, if someone spend time working on this.<br clear="none">>>> but my concern is : why is this important?<br clear="none">>>><br clear="none">>>> i mean : if you don't care about conservation or portability, just <br clear="none">>>> start pd loading a maximum of externals and use all of them.<br clear="none">>>><br clear="none">>>> but if you do care about conservation or portability, then load pd <br clear="none">>>> with only a minimal set of externals, and "declare" the other only <br clear="none">>>> when you need them.<br clear="none">>><br clear="none">>> I do care of both. I've used to write my patch with pd-extended, that <br clear="none">>> eliminates the problem "from the root".<br clear="none">> pd-extended did not solve this problem: pd-extended create this problem!<br clear="none">Again, I totally agree with you! :)<br clear="none"><br clear="none">><br clear="none">>  In this way my patch will work (almost) certainly with pd-extended <br clear="none">> across each platform and from now on.<br clear="none">>> But I've decided to abandon extended for all the reason that we all <br clear="none">>> know :)<br clear="none">>> The problem, now, is:<br clear="none">>> - If I want to distribute my patch, it would be great to write down <br clear="none">>> the dependencies, for example in the README. And virtually, since <br clear="none">>> I've used to work with pd-extended, I've in some way "lost" the <br clear="none">>> border within vanilla objects and extended objects, so I've to <br clear="none">>> manually check each time (i.e.: hummm spigot~ is vanilla? NO, ok... <br clear="none">>> let me check... oh ok... is in the unathorized package -> each time <br clear="none">>> for each object).<br clear="none">>> - I use different machines with different OS, etc... and sometimes I <br clear="none">>> use "fresh" pd vanilla installation. Ideally, I want to install only <br clear="none">>> the externals that I need. If I have a list of externals needed for <br clear="none">>> my patch, this process would be much more easy (few clicks with Deken)!<br clear="none">>><br clear="none">> i think you should first reduce number of external you need : spigot~ <br clear="none">> can be certainly be replace with a *~...<br clear="none"><br clear="none">Yes, I'm going to proceed this way in order to reduce the number of <br clear="none">abstraction. That's the way I've used to work before starting to use <br clear="none">pd-extended.<br clear="none">I prefer to implement the object as abstraction by myself, but <br clear="none">pd-extended has spoiled me :)<br clear="none">I guess that I will have to do a lot of work in vanilla-izing all my old <br clear="none">patches.<br clear="none"><br clear="none">Anyway, I think that a method to "attach" a list of "used externals" to <br clear="none">a given patch would be useful!<br clear="none"><br clear="none">Cheers<br clear="none"><br clear="none">><br clear="none">> you can replace lot's of externals using abstractions.<br clear="none">> that's a lot of work, but your patchs will be lot's more portable.<br clear="none">><br clear="none">> cheers<br clear="none">> c<br clear="none">><br clear="none">><br clear="none">><br clear="none">>>><br clear="none">>>> So, my advice is :<br clear="none">>>> better than making a mess and try to fix it latter, it's easier to <br clear="none">>>> make things clean in the 1st time.<br clear="none">>><br clear="none">>> I totally agree with this! :)<br clear="none">>><br clear="none">>> Cheers<br clear="none">>>><br clear="none">>>> cheers<br clear="none">>>> c<br clear="none">>>><br clear="none">>>><br clear="none">>><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> <a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">> UNSUBSCRIBE and account-management -> <br clear="none">> <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><div class="yqt9391339558" id="yqtfd84347"><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">a.<br clear="none"><br clear="none"><br clear="none">_______________________________________________<br clear="none"><a shape="rect" ymailto="mailto:Pd-list@lists.iem.at" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br clear="none">UNSUBSCRIBE and account-management -> <a shape="rect" href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>