Forums > Java

Anoying bug with MaxPatcher.getAllBoxes

February 20, 2006 | 6:38 pm


February 20, 2006 | 6:48 pm

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


February 20, 2006 | 7:03 pm

>> 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


February 20, 2006 | 8:10 pm

That’s working fine now… thanks for your help

Chris


Viewing 4 posts - 1 through 4 (of 4 total)