boxless mxj object

Feb 24, 2006 at 7:52pm

boxless mxj object

can anyone tell me if it’s possible, and if so, how to create a
boxless java object (similar to class_new() in the c max api)? if
not, can I enter a feature request?

best,
r.

#24601
Feb 24, 2006 at 8:51pm

Couldn’t you just manually construct one?
MyMXJClass x = new MyMXJClass();
Calling any methods on the thing that cause
an outlet or make any other assumptions about
it having a context in a patch may be a bad idea though.
Topher

#71433
Feb 25, 2006 at 3:22am

ok, so far I’ve managed to create and instantiate a hidden MaxObject
and attach to it from multiple boxed objects. in my notifyDelete()
method of the boxed objects I detach from the hidden object which
seems to work fine. what isn’t working so well is destroying the
hidden object when the last boxed object is deleted. any suggestions
as to how I might go about doing this? or do I have to assume that it
will live forever as some mxj internal is keeping a reference to it,
thereby preventing it from being garbage collected.

my other alternative is to call a “reset” message on it, which
reinitializes its internal state when the last object is being
deleted. then when the first new object goes to connect and expects
to create a fresh object, it just gets the old one back, but cleaned
up. does this have something to do with zap()?

best,
r.

#71434

You must be logged in to reply to this topic.