Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34431

Re: How to extend an array

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How to extend an array
Date 2016-05-31 17:01 -0400
Organization A noiseless patient Spider
Message-ID <niku2v$hhp$1@dont-email.me> (permalink)
References <ae727260-8c33-4648-8995-f387a6eb8b52@googlegroups.com> <nikc0f$b0v$1@dont-email.me> <f46278e9-a64d-42d4-8c2d-5e0cfd168692@googlegroups.com> <nikk4d$ao3$1@dont-email.me> <d8ea605f-0759-4b10-b293-235cc558d6e9@googlegroups.com>

Show all headers | View raw


On 5/31/2016 2:25 PM, Eric Douglas wrote:
> On Tuesday, May 31, 2016 at 2:11:36 PM UTC-4, Eric Sosman wrote:
>>      Since I'm still not sure I understand what you're trying to do,
>> I can't comment.  Not usefully, anyhow.
>
> So, the same sample with the missing pieces you mentioned.  Class1 is a customized JFrame.  In this example it's just a default JFrame with a default close operation automatically set and a default window listener created.  Class2 is a customized Class1.  In this example it just adds another default to report window iconified (minimize) events.  Does this structure make sense, just making an array in the extended class (which apparently adds a second array on top of the one in the super class even if I make that visible and give the second one the same name), passing listeners into both arrays from the second class?
> [... see up-thread for code ...]

     I'm afraid I still can't understand what you're up to.  It seems a
Class2 instance will have listeners of two kinds, and will maintain two
references to some of them:

     - A Listener1 registered with addListener() will appear in one
       list of listeners,

     - A Listener2 registered with addExtendedListener() will appear
       in two lists of listeners, once in its Listener2 aspect and
       again as its Listener1 superinterface.

     I'm at a loss to understand why you want the Listener2's double-
registered, held in two lists.  Since the list in Class1 appears to
serve no purpose (listeners get added to it and thereafter ignored),
it seems likely that further detail has been simplified away -- but
simplified to the extent that I cannot divine what you're about.
It's over my head, I fear.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 07:52 -0700
  Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 11:52 -0400
    Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 11:56 -0400
      Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 09:19 -0700
        Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 14:01 -0400
    Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 09:09 -0700
      Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 14:11 -0400
        Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-05-31 11:25 -0700
          Re: How to extend an array Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-31 17:01 -0400
            Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-01 04:57 -0700
  Re: How to extend an array Roedy Green <inquiry@mindprod.com> - 2016-05-31 21:56 -0700
    Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-01 04:49 -0700
  Re: How to extend an array Robert Klemme <shortcutter@googlemail.com> - 2016-06-01 23:07 +0200
    Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-03 05:38 -0700
      Re: How to extend an array Robert Klemme <shortcutter@googlemail.com> - 2016-06-04 19:17 +0200
    Re: How to extend an array Eric Douglas <e.d.programmer@gmail.com> - 2016-06-03 08:52 -0700

csiph-web