XML Feeds

.

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

Owen Green owen at owengreen.net
Fri Sep 7 03:12:12 MDT 2007


Adam Murray wrote:
> As demonstrated in the included external and patch, any calls to
> outlet() inside the constructor seem to be ignored.

The object doesn't, strictly speaking, exist until the constructor has 
completed, so this isn't surprising.

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.

-- 
O


More information about the java-dev mailing list