<br><br><div class="gmail_quote">2011/7/12 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style="word-wrap:break-word"><div><div></div><div class="h5"><br><div><div>On Jul 11, 2011, at 6:09 PM, András Murányi wrote:</div><br><blockquote type="cite"><br><br><div class="gmail_quote">On Mon, Jul 11, 2011 at 23:50, Hans-Christoph Steiner <span dir="ltr">&lt;<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div><div></div><div><br> On Jul 11, 2011, at 5:35 PM, Jonathan Wilkes wrote:<br> <br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 <br> <br> --- On Mon, 7/11/11, Hans-Christoph Steiner &lt;<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>&gt; wrote:<br> <br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 From: Hans-Christoph Steiner &lt;<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>&gt;<br> Subject: implementing tooltips WAS: [PD] Pd-extended 0.43 updates: lots of new editing features<br> To: &quot;Jonathan Wilkes&quot; &lt;<a href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>&gt;<br>

 Cc: &quot;Martin Peach&quot; &lt;<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>&gt;, &quot;Mathieu Bouchard&quot; &lt;<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>&gt;, &quot;pd-list&quot; &lt;<a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a>&gt;<br>

 Date: Monday, July 11, 2011, 11:18 PM<br> <br> On Jul 11, 2011, at 3:58 PM, Jonathan Wilkes wrote:<br> <br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> <br>

 --- On Mon, 7/11/11, Mathieu Bouchard &lt;<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>&gt;<br> </blockquote> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 <br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> From: Mathieu Bouchard &lt;<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>&gt;<br> Subject: Re: [PD] Pd-extended 0.43 updates: lots<br>

 </blockquote></blockquote> of new editing features<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 To: &quot;Martin Peach&quot; &lt;<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>&gt;<br> Cc: &quot;pd-list&quot; &lt;<a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a>&gt;<br>

 Date: Monday, July 11, 2011, 7:45 PM<br> On Mon, 11 Jul 2011, Martin Peach<br> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On 2011-07-11 12:06, Jonathan Wilkes wrote:<br>

 <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> But I&#39;m not sure where to store the<br> </blockquote></blockquote></blockquote></blockquote> tooltip<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> string...<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>

 Not sure if that&#39;s what you mean, but in max<br> </blockquote></blockquote></blockquote> the<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 assist method receives a number corresponding to<br> </blockquote></blockquote> the inlet<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 or outlet and returns a pointer to the appropriate<br> </blockquote></blockquote> string,<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 so the string is already stored somewhere in the<br> </blockquote></blockquote> memory<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 allocated to the object.<br> <br> Not necessarily : the assist-method could be<br> </blockquote></blockquote> storing the<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> data anywhere, or generating it on-the-fly from<br> </blockquote></blockquote> whatever.<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 <br> Hm...<br> <br> 1 when creating an xlet for the first time, bind its<br> </blockquote> tag on &lt;Enter&gt; and &lt;Leave&gt; to call<br> pdtk_tooltips, and send $canvas, $inletno and $object_name<br> as arguments<br>

 <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> 2 in tcl, search helppath for $object_name-help.pd,<br> </blockquote> then parse it for $inletno (which I added as a pd META tag<br>

 for every internal help patch-- plus lots of externals,<br> too)<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> 3 filter the matching line in tcl to display<br>

 </blockquote> everything after $inletno minus the semicolon. (I.e., &quot;text<br> 20 20 INLET_0 float symbol bang;&quot; becomes &quot;float symbol<br> bang&quot;)<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 <br> 4 create that text on a little tooltip rectangle on<br> </blockquote> $canvas; delete it on &lt;Leave&gt;<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>

 All you add on the pd side is a sys_gui call to create<br> </blockquote> the binding, then handle everything else on the tcl side.<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

 <br> Does that make sense?  If so, then once someone<br> </blockquote> gets it working (maybe me), you&#39;d not only have tooltips,<br> but you&#39;d have tooltip content for over 1000 object classes<br> (minus exceptions like &quot;list split&quot;, and variable/rightmost<br>

 inlets which I&#39;m not sure how to handle...)<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> Also doesn&#39;t address tooltips for abstractions.<br> <br>

 -Jonathan<br> </blockquote> <br> I like this idea quite a bit.  If the tooltip info is<br> stored in a help patch, then we have a single way of<br> specifying the tooltip info regardless if the object was<br> written in C, Pd, Lua, etc.  The downside will be a lot<br>

 more file parsing on load.  Perhaps we can do some kind<br> of low priority thread kind of thing in Tcl to do that<br> loading.<br> <br> One detail, instead of searching the path for the help<br> patch, really we should try to get the full path of the<br>

 object in question, then use that to get the help patch...<br> </blockquote> <br> Ok.<br> Is c_helpname guaranteed to be inside c_externdir?<br> </blockquote> <br> <br></div></div> I can&#39;t remember ever using c_helpname, so I can&#39;t really say.<br>

 <br> IMHO, I don&#39;t think we should support other ways of specifying the help file.  There are very few objects that use it, those are fixed in Pd-extended, it&#39;ll add a lot to the work of doing this, etc. etc.  So I say just take the object name and add the &#39;-help&#39; to it.  That covers 99.5% of objects.  Then once its working, it should be possible to go back and add hacks to support hacks ;)<br>

 <br> .hc<br></blockquote><div><br>Am I getting right, that this logic could be applied to abstraction xlets too? How cool...<br>I don&#39;t know much about the new help file system, but I know it&#39;s well thought out, so I&#39;m just asking very carefully: could it be it possible to allow abstractions to contain their own META tags (in case there&#39;s no help file)?  That would make things even easier (+ less files).<br>

</div></div></blockquote></div><div><br></div></div></div>Why not just keep it in the helpfile?  Its super easy to make help files, and its a good habit even for your own projects.  If we have to parse both abstractions and help files, that means a lot more parsing, making the system even slower.<div>

<br></div><div>.hc<br><div> <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;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>

<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;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></span></span></div>

</div></div></blockquote><div><br>As Matju pointed out, abstractions&#39; help file is canvas-help.pd. Other things to advocate my suggestion:<br>- Patches themselves are parsed anyway, CPU will only be needed to look up the META elements.<br>

- The overwhelming majority of abstractions is self-documented at the moment (also because of the before mentioned canvas-help functionality).<br>So I could still imagine this logic:<br>- If the object is an abstraction, its parsed content gets searched for META elements first.<br>

- If no META stuff found, *maybe* myabstaction-help.pd is checked if exists (and then parsed etc.).<br><br>Andras<br>
</div></div>