Anoying bug with MaxPatcher.getAllBoxes

Feb 20, 2006 at 6:38pm

Anoying bug with MaxPatcher.getAllBoxes

#24522
Feb 20, 2006 at 6:48pm

On 20 Feb 2006, at 18:38, Chris wrote:

> Contructor of mxj object contains:
> ———————————-
> MaxBox[] boxes = getParentPatcher().getAllBoxes();

Ooh … as a wild guess, I’d say that getParentPatcher().getAllBoxes
() is not safe to call in your constructor, since the patcher is
still being built as your MXJ object is being created and its
constructor called.

– N.

nick rothwell — composition, systems, performance — http://
http://www.cassiel.com

#71061
Feb 20, 2006 at 7:03pm

>> Contructor of mxj object contains:
>> ———————————-
>> MaxBox[] boxes = getParentPatcher().getAllBoxes();
>
> Ooh … as a wild guess, I’d say that getParentPatcher().getAllBoxes()
> is not safe to call in your constructor, since the patcher is still
> being built as your MXJ object is being created and its constructor called.

yes yes yes… this seems a very good reason for my problem…

I’ll move the code to loadbang to see what’s happening.

best regards,
Chris

#71062
Feb 20, 2006 at 8:10pm

That’s working fine now… thanks for your help

Chris

#71063

You must be logged in to reply to this topic.