| From | Sent On | Attachments |
|---|---|---|
| Forwinder | Aug 22, 2008 8:11 am | |
| Frank Barknecht | Aug 22, 2008 9:30 am | |
| IOhannes m zmoelnig | Aug 23, 2008 3:07 am | |
| Luke Iannini | Aug 23, 2008 4:15 am | |
| IOhannes m zmoelnig | Aug 23, 2008 5:02 am | |
| Claude Heiland-Allen | Aug 23, 2008 5:14 am | |
| Frank Barknecht | Aug 23, 2008 5:18 am | |
| Claude Heiland-Allen | Aug 23, 2008 5:25 am | .c |
| Martin Peach | Aug 23, 2008 7:55 am | |
| Frank Barknecht | Aug 23, 2008 8:00 am | |
| Stephen Sinclair | Aug 23, 2008 9:33 am | |
| forwind | Aug 25, 2008 10:33 am | |
| Hans-Christoph Steiner | Aug 26, 2008 4:58 pm |
| Subject: | [PD-dev] pd_error in constructors (Was: Re: dump OSC bugs?) | |
|---|---|---|
| From: | Claude Heiland-Allen (clau...@goto10.org) | |
| Date: | Aug 23, 2008 5:25:02 am | |
| List: | at.iem.pd-dev | |
| Attachments: | ||
Claude Heiland-Allen wrote:
can you make it use pd_error (or whatever it's called) so you can find the object more easily? would that even work in the constructor?
I was curious, so I tested it..
Calling pd_error on the newly constructed object in the newmethod does work (in that find last error finds it), which is nice.
Claude
#include <m_pd.h>
static t_class *errorconstructor_class;
struct errorconstructor { t_object obj; };
static struct errorconstructor *errorconstructor_new(void) {
struct errorconstructor *e = (struct errorconstructor *)
pd_new(errorconstructor_class);
pd_error(e, "errorconstructor!");
return e;
}
extern void errorconstructor_setup() { errorconstructor_class = class_new( gensym("errorconstructor"), (t_newmethod) errorconstructor_new, 0, sizeof(struct errorconstructor), CLASS_NOINLET, 0 ); }
#N canvas 0 0 450 300 10; #X obj 87 131 errorconstructor;






.c