[PD] Pd-extended 0.43 updates: lots of new editing features

Jonathan Wilkes jancsika at yahoo.com
Mon Jul 11 21:58:12 CEST 2011



--- On Mon, 7/11/11, Mathieu Bouchard <matju at artengine.ca> wrote:

> From: Mathieu Bouchard <matju at artengine.ca>
> Subject: Re: [PD] Pd-extended 0.43 updates: lots of new editing features
> To: "Martin Peach" <martin.peach at sympatico.ca>
> Cc: "pd-list" <pd-list at iem.at>
> Date: Monday, July 11, 2011, 7:45 PM
> On Mon, 11 Jul 2011, Martin Peach
> wrote:
> > On 2011-07-11 12:06, Jonathan Wilkes wrote:
> >> But I'm not sure where to store the tooltip
> string...
> > 
> > Not sure if that's what you mean, but in max the 
> assist method receives a number corresponding to the inlet
> or outlet and returns a pointer to the appropriate string,
> so the string is already stored somewhere in the memory
> allocated to the object.
> 
> Not necessarily : the assist-method could be storing the
> data anywhere, or generating it on-the-fly from whatever.

Hm...

1 when creating an xlet for the first time, bind its tag on <Enter> and <Leave> to call pdtk_tooltips, and send $canvas, $inletno and $object_name as arguments

2 in tcl, search helppath for $object_name-help.pd, then parse it for $inletno (which I added as a pd META tag for every internal help patch-- plus lots of externals, too)

3 filter the matching line in tcl to display everything after $inletno minus the semicolon. (I.e., "text 20 20 INLET_0 float symbol bang;" becomes "float symbol bang")

4 create that text on a little tooltip rectangle on $canvas; delete it on <Leave>

All you add on the pd side is a sys_gui call to create the binding, then handle everything else on the tcl side.

Does that make sense?  If so, then once someone gets it working (maybe me), you'd not only have tooltips, but you'd have tooltip content for over 1000 object classes (minus exceptions like "list split", and variable/rightmost inlets which I'm not sure how to handle...)

Also doesn't address tooltips for abstractions.

-Jonathan

> 
> In theory, tooltip strings could be stored in something at
> the class-level instead of the object-level, just like
> methods called at the object-level refer to a method-table
> stored at the class-level.
> 
> But Pd doesn't allow extending struct t_class by externals,
> and it doesn't have a tooltip field (except Günter's
> tooltip diff included a field for storing a symbol
> containing the text of the left-inlet's text... and only
> that).
> 
> GF has its own parallel class-table for storing some
> meta-info, and C++'s «static members» for the rest.
> 
> 
> _______________________________________________________________________
> | Mathieu Bouchard ---- tél: +1.514.383.3801 ----
> Villeray, Montréal, QC
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Pd-list at iem.at
> mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> 



More information about the Pd-list mailing list