I think you're safe calling vmess() to pass no arguments to clip_new (for example) - the worst that can happen is the "return value" (the global "newest" is zero. If not it's a proper Pd object you can use zgetfn() on to test it for messages.
Main problem I see with this is that some classes like "select" and "list" are actually several classes that share a name (and which one gets created depends on the arguments sent to vmess())
cheers Miller
On Thu, Jan 03, 2013 at 09:16:27PM -0800, Jonathan Wilkes wrote:
Hi list, Â Â Â Â Since matju couldn't find a way to do this without patching Pd I doubt it's possible, but I want to ask anyway:
[symbol clip( | [classinfo] <-- spits out a list of methods, or other class attributes, etc.
I can check if clip exists using zgetfn
I can get a function pointer to clip_new using zgetfn
I assume I can assign t_object *instance using my function pointer to clip_new that I got from zgetfn, but since I short circuited the normal way of creating the object I have no way of knowing what kind of args to send it, so it seems like I'm likely to crash.
Is there really no way to inspect class "foo" given symbol foo and proof from zgetfn that "foo" exists?
-Jonathan
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev