xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arnaud Le Hors <leh...@us.ibm.com>
Subject Re: Deferred nodes and a little bit of swing :)
Date Wed, 09 Feb 2000 23:46:53 GMT
"Max R. Andersen" wrote:
> 
> > I wouldn't suggest doing this. In fact, there should be
> > no need for instanceof DeferredNode. Your program should
> > not even care that the construction is being deferred.
> 
> I also thought that in the begining but the problem is
> that IF the nodes are deferred then the hasChildNodes() method returns
> false even if it should have children :(

So, it looks like we may have a bug. But Andy is right, the expansion is
meant to occur automatically whenever it is necessary. I just had a look
at the relevant pieces of code and didn't see anything obvious...

> So I make the instanceof test to tell the TreeModel that it is
> *possible*
> that the node has children.

I'm afraid this won't do it. If there is a bug and somehow you end up in
a situation where the implementation thinks a node is expanded, even if
it's not, there is not much you can do. (apart from tracking the bug ;-)
-- 
Arnaud  Le Hors - IBM Cupertino, XML Technology Group

Mime
View raw message