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

sliders: passing objects instead of IDs

Expand Messages
  • Reto Bachmann-Gmür
    Hello I wanted to use yahoo-sliders in a tool which replaces specially marked input-fields with sliders [1]. I m surpised to see the Slider constructor and
    Message 1 of 4 , May 2, 2006
    • 0 Attachment
      Hello

      I wanted to use yahoo-sliders in a tool which replaces specially marked
      input-fields with sliders [1].

      I'm surpised to see the Slider constructor and functions like
      getHorizSlider to expect the IDs of element rather that the element
      itself. It seem awkward when elements are generated from another script,
      to have to assign an ID to them pass this ID to the Slider-script which
      will look up the element again. Are there particular reasons not to have
      a getHorizSlider-method (or a variant of it) taking the div-elements
      rather than their IDs? (I'd like to restrict the use of strings to code
      which actually deals with text/plain).

      reto


      1. for an example of the current implementation which does not yet base
      on the yahoo widget see: http://gmuer.ch/script-examples/slider-devel
    • Reto Bachmann-Gmür
      (reposting, as original post didn t show up on the list) Hello I wanted to use yahoo-sliders in a tool which replaces specially marked input-fields with
      Message 2 of 4 , May 4, 2006
      • 0 Attachment
        (reposting, as original post didn't show up on the list)

        Hello

        I wanted to use yahoo-sliders in a tool which replaces specially marked
        input-fields with sliders [1].

        I'm surpised to see the Slider constructor and functions like
        getHorizSlider to expect the IDs of element rather that the element
        itself. It seem awkward when elements are generated from another script,
        to have to assign an ID to them pass this ID to the Slider-script which
        will look up the element again. Are there particular reasons not to have
        a getHorizSlider-method (or a variant of it) taking the div-elements
        rather than their IDs? (I'd like to restrict the use of strings to code
        which actually deals with text/plain).

        reto


        1. for an example of the current implementation which does not yet base
        on the yahoo widget see: http://gmuer.ch/script-examples/slider-devel
      • Nige White
        ... I d just like to add my voice to this. I d really want to pass an Element reference, rather than an ID string in almost all cases. Usually, I have the
        Message 3 of 4 , May 5, 2006
        • 0 Attachment
          Reto Bachmann-Gmür wrote:

          >(reposting, as original post didn't show up on the list)
          >
          >Hello
          >
          >I wanted to use yahoo-sliders in a tool which replaces specially marked
          >input-fields with sliders [1].
          >
          >I'm surpised to see the Slider constructor and functions like
          >getHorizSlider to expect the IDs of element rather that the element
          >itself. It seem awkward when elements are generated from another script,
          >to have to assign an ID to them pass this ID to the Slider-script which
          >will look up the element again. Are there particular reasons not to have
          >a getHorizSlider-method (or a variant of it) taking the div-elements
          >rather than their IDs? (I'd like to restrict the use of strings to code
          >which actually deals with text/plain).
          >
          >
          I'd just like to add my voice to this. I'd really want to pass an
          Element reference, rather than an ID string in almost all cases.
          Usually, I have the reference to the actual Element, and it might well
          be generated in script, with the reference stored as an object property,
          and not *need* an ID.

          Currently, I have to generate IDs from the millsecond time plus a random
          for this type of element.

          Nige

          _____________________________________________________________________
          This message has been checked for all known viruses. Virus scanning
          powered by Messagelabs http://www.messagelabs.com For more information
          e-mail : hostmaster@...
        • ggederer
          ... marked ... script, ... which ... have ... code ... This is a nuisance, I agree. Slider is not the only component that suffers from this limitation. It
          Message 4 of 4 , May 8, 2006
          • 0 Attachment
            --- In ydn-javascript@yahoogroups.com, Reto Bachmann-Gmür
            <yahoo@...> wrote:
            >
            > Hello
            >
            > I wanted to use yahoo-sliders in a tool which replaces specially
            marked
            > input-fields with sliders [1].
            >
            > I'm surpised to see the Slider constructor and functions like
            > getHorizSlider to expect the IDs of element rather that the element
            > itself. It seem awkward when elements are generated from another
            script,
            > to have to assign an ID to them pass this ID to the Slider-script
            which
            > will look up the element again. Are there particular reasons not to
            have
            > a getHorizSlider-method (or a variant of it) taking the div-elements
            > rather than their IDs? (I'd like to restrict the use of strings to
            code
            > which actually deals with text/plain).
            >

            This is a nuisance, I agree. Slider is not the only component that
            suffers from this limitation. It would be nice to be able to assemble
            my GUI without having to add any of its elements to the DOM until after
            assembly. This would require significant retooling of DragDrop. I
            would probably do this if I had a place to drop the diffs. But, I don't
            want to get out of sync with the project.

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