On Wed, Aug 5, 2009 at 12:47 AM, Greg Brown<[email protected]> wrote:
>> The line is this:
>>           for (ElementListener listener : this) {
>> both in the nodeInserted and in the nodeRemoved methods ...
>
> Right. But ElementListenerList is defined within
> org.apache.pivot.wtk.text.Element, and org.apache.pivot.wtk.text.Element
> doesn't define nodeInserted() or nodesRemoved(). So I can't figure out where
> the problem might be.

My guess is that it is related to that the "for" statement does a

this.iterator();

and since both the outer and inner classes are "Iterable", it wants to
highlight that you may be referring to the wrong "this" instance.

I also guess that if you just make ElementListenerList a "static
class", the warning/error will go away (and you make it one reference
smaller on the heap, and a slightly smaller constructor code).


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Reply via email to