XML Feeds

.

[java-dev] Re: Bug/limitation: outlet() does not work in the constructor

Adam Murray adamjmurray at gmail.com
Fri Sep 7 10:42:26 MDT 2007


Quote: owen wrote on Fri, 07 September 2007 02:12
----------------------------------------------------
> 
> I think you'll need something to run asynchronously, after the 
> constructor has finished:
> 
>              new MaxQelem(new Executable() {
>                  public void execute(){
>                      outlet(0, myattr);
>                  }
>              }).set();
> 
> This works here - don't know how reliable it is without building some 
> sort of delay into it though. So YMMV.
> 

Thanks Owen, I'll give this a shot. 

You mentioned reliability - I'll keep this in mind if things stop working as my patch gets more complex. If that's potentailly going to be a problem, I'd like to make a feature request to have a new overridable method in MaxObject that's like loadbang(), but will be called after the object is initialized. This would be useful for any who is patching on-the-fly with mxj externals. 

I'll post another message if I actually do run into any reliability problems with this MaxQelem approach.

-Adam


More information about the java-dev mailing list