[PD] *info classes (was: Re: Reverse Kickstarter Update)

Jonathan Wilkes jancsika at yahoo.com
Sat Aug 31 04:33:49 CEST 2013


Hi List,
     Here is the first stab at a nearly completed set of tools with a nearly standard
interface for finding the attributes of pd's global settings, canvas state, and object
classes.  When I say "nearly complete" I mean I've completed just about everything
I set out to implement at the beginning of the "reverse kickstarter".  There is certainly
room for adding more features-- like the programmatic equivalent of the "find" dialog.

Right now each class posts a message when loaded about what its stable
methods are.  These are currently a small subset of what I've implemented-- mainly
things I find fairly trivial.  For the others, I'd like to get more feedback from people
before calling them "stable"-- whether they seem to work well, if they have bugs, and
if there's a cleaner way to implement them.

Then I'll go through a few more revisions and hopefully remove the "stable" messages
once everything looks good.

Some points:
* there is a discrepancy between what is a class and what can be created inside an
object box.  This will become apparent when you try to do [args(---[classinfo] for things
like canvas and message.  I'm not exactly sure how to "get at" the arguments for these
objects.  Pdobviously accesses them but I don't know how.
* I can probably add a bang method to [classinfo] that merely checks for existence.
* It would probably be nice if [classinfo] could output a list of all loaded classes.  That is
very similar to iterating through [classinfo objectmaker], but for the reason outlined
it's not exactly the same.
* currently, [methods(---[classinfo foo] only lists the non-standard methods. I.e., it doesn't
include float, bang, pointer, list, etc.  Not sure if those should just be separate methods
like [bangmethod(---[classinfo], or if they should be include at the beginning of the method
list.
* I added [pi(---[pdinfo] because I always forget its value, and it allows consistent precision
between saving and loading a patch.  (The implementation is also forward compatible with
pd-64, if I did my copy/pasting correctly...)
* Probably should add a method to [pdinfo] to get the operating system name.


That's about it.  I don't have demo builds for these-- only patches to pd-0.45.  But it should
apply equally well to 0.44 and pd-l2ork.  Regardless you can get a sense of the interface
from opening info-test.pd.


As always, donations of rice and beans are appreciated!


-Jonathan
https://jwilkes.nfshost.com/donations.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130830/15ab611b/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: info-vanilla.patch
Type: text/x-patch
Size: 31523 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130830/15ab611b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: info-test.pd
Type: text/x-puredata
Size: 4088 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130830/15ab611b/attachment-0003.bin>


More information about the Pd-list mailing list