[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

type_writer problem



I'm using MzScheme (version 103) as an embedded language in my
sound editor (Snd), and would like to specialize the way some
types are displayed; I've tried something along these lines:

typedef struct {
#if HAVE_MZSCHEME
  Scheme_Type mztype;
#endif
  int length;
  Float *data;
  int dont_free;
} vct;

static Scheme_Object *vct_write(Scheme_Object *obj)
{
  fprintf(stderr,"in writer");
  return(scheme_make_string("Vct..."));
}

Scheme_Type vct_tag;

vct_tag = scheme_make_type("Vct");

scheme_install_type_writer(vct_tag, vct_write);

but the vct_write procedure is never called.  Everything
else appears to be fine with the new vct type (i.e. type
checks, etc).



> We actually looked into this a few months ago.  We concluded,
> unfortunately, that the package was still not polished
> enough at that time to link into Mz/DrScheme.  Perhaps
> that will change now.

Hmmm... I am very tempted to respond to this pompous asshole,
but I guess I'll give him a chance to fix the bug mentioned
above.  Polish your code, buster!