Sorry.  The comment for t_gpointer says that it (i.e., the gpointer) can point to a gobj in a glist.  At the same time it looks like it is limited to just scalars, so I was wondering if I could abuse it to store references to t_texts.

I'm putting together an object to query the attributes of a Pd object on a canvas.  I already have an object to query canvas info, and I want a few methods in [canvasinfo] that will output references to objects on the canvas (for example, a "find" method).  So I was wondering about abusing gpointers to send the references between [canvasinfo] and [objectinfo].

Now I'm thinking I'll just send around floats to represent the index number of the object.  That adds a floatinlet to the interface of [objectinfo] (to set the canvas "level") as well as a loop to arrive at the relevant object.  But that's still probably easier than what I'm wondering about doing with t_gpointer.

-Jonathan




On Wednesday, June 4, 2014 4:43 AM, Miller Puckette <msp@ucsd.edu> wrote:


what's the "it" that can point to a gobj?  I can't fgure out what this question
means...

cheers
M

On Tue, Jun 03, 2014 at 11:48:29AM -0700, Jonathan Wilkes via Pd-list wrote:
> The comment in m_pd.h says it can point to a gobj in a glist.  So if I want to store a reference to something that has a gobj header, can I just cast to t_scalar*?
>
> -Jonathan


> _______________________________________________
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list