<br><br><div class="gmail_quote">On Mon, Jul 11, 2011 at 23:50, Hans-Christoph Steiner <span dir="ltr"><<a href="mailto:hans@at.or.at">hans@at.or.at</a>></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 <<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>> 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 <<a href="mailto:hans@at.or.at" target="_blank">hans@at.or.at</a>><br>
Subject: implementing tooltips WAS: [PD] Pd-extended 0.43 updates: lots of new editing features<br>
To: "Jonathan Wilkes" <<a href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>><br>
Cc: "Martin Peach" <<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>>, "Mathieu Bouchard" <<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>>, "pd-list" <<a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a>><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 <<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>><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 <<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>><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" <<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>><br>
Cc: "pd-list" <<a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a>><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 <Enter> and <Leave> 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 <Leave><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'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. 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'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. 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. So I say just take the object name and add the '-help' 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'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)? That would make things even easier (+ less files).<br>
<br>Andras<br>
</div></div>