Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] removeListener index parameter

Expand Messages
  • Adam Moore
    ... This parameter is used internally, and as of the latest version cannot be used in the manner you are suggesting because the index for a given listener is
    Message 1 of 3 , Aug 31, 2006
    • 0 Attachment
      On Thu, Aug 31, 2006 at 04:16:47PM -0700, Peter Michaux wrote:
      > Hi,
      >
      > What is the intended use of the fourth parameter called "index" in
      > remove listener?
      >
      > boolean removeListener (<Object> el, <String> sType, <Function> fn, index)
      >
      > It looks like I could use it something like this
      >
      > YAHOO.util.Event.removeListener(null, null null, 7)
      >
      > if I knew the index of the listener I wanted to remove. This index
      > parameter is not documented. Is this parameter likely to be used? Is
      > there some special case or trick for which this is useful?

      This parameter is used internally, and as of the latest version cannot be
      used in the manner you are suggesting because the index for a given listener
      is not static.

      -Adam
    • Peter Michaux
      ... Hi Adam, Thanks for the reply about this. So is this fourth index parameter no longer needed at all? From what you say, it seems like it is redundant.
      Message 2 of 3 , Sep 4, 2006
      • 0 Attachment
        On 8/31/06, Adam Moore <adamoore@...> wrote:
        >
        > On Thu, Aug 31, 2006 at 04:16:47PM -0700, Peter Michaux wrote:
        > > Hi,
        > >
        > > What is the intended use of the fourth parameter called "index" in
        > > remove listener?
        > >
        > > boolean removeListener (<Object> el, <String> sType, <Function> fn, index)
        > >
        > > It looks like I could use it something like this
        > >
        > > YAHOO.util.Event.removeListener(null, null null, 7)
        > >
        > > if I knew the index of the listener I wanted to remove. This index
        > > parameter is not documented. Is this parameter likely to be used? Is
        > > there some special case or trick for which this is useful?
        >
        >
        > This parameter is used internally, and as of the latest version cannot be
        > used in the manner you are suggesting because the index for a given listener
        > is not static.

        Hi Adam,

        Thanks for the reply about this.

        So is this fourth index parameter no longer needed at all? From what
        you say, it seems like it is redundant.

        Peter
      Your message has been successfully submitted and would be delivered to recipients shortly.