<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 11, 2011, at 6:09 PM, András Murányi wrote:</div><br class="Apple-interchange-newline"><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">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 class="h5"><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: "Jonathan Wilkes" &lt;<a href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>&gt;<br> Cc: "Martin Peach" &lt;<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>&gt;, "Mathieu Bouchard" &lt;<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>&gt;, "pd-list" &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: "Martin Peach" &lt;<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>&gt;<br> Cc: "pd-list" &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'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'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., "text<br> 20 20 INLET_0 float symbol bang;" becomes "float symbol<br> bang")<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? &nbsp;If so, then once someone<br> </blockquote> gets it working (maybe me), you'd not only have tooltips,<br> but you'd have tooltip content for over 1000 object classes<br> (minus exceptions like "list split", and variable/rightmost<br> inlets which I'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't address tooltips for abstractions.<br> <br> -Jonathan<br> </blockquote> <br> I like this idea quite a bit. &nbsp;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. &nbsp;The downside will be a lot<br> more file parsing on load. &nbsp;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't remember ever using c_helpname, so I can't really say.<br> <br> IMHO, I don't think we should support other ways of specifying the help file. &nbsp;There are very few objects that use it, those are fixed in Pd-extended, it'll add a lot to the work of doing this, etc. etc. &nbsp;So I say just take the object name and add the '-help' to it. &nbsp;That covers 99.5% of objects. &nbsp;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't know much about the new help file system, but I know it's well thought out, so I'm just asking very carefully: could it be it possible to allow abstractions to contain their own META tags (in case there's no help file)?&nbsp; That would make things even easier (+ less files).<br></div></div></blockquote></div><div><br></div>Why not just keep it in the helpfile? &nbsp;Its super easy to make help files, and its a good habit even for your own projects. &nbsp;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 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; "><br class="Apple-interchange-newline"><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><br style="font-family: Tahoma; "></div><div>----------------------------------------------------------------------------</div><div><br style="font-family: Tahoma; "></div><div>There is no way to peace, peace is the way. &nbsp; &nbsp;&nbsp; &nbsp;-A.J. Muste</div><br class="Apple-interchange-newline"></span></span> </div><br></div></body></html>