How to use TreeMap, TreeSet, etc?

Discussion in 'Javascript' started by Mark Wayne, Jul 15, 2003.

  1. Mark Wayne

    Mark Wayne Guest

    Is is possible to use TreeMap in the javascript <SCRIPT> portion of HTML? If
    so, how?

    Thanks,
    mark
     
    Mark Wayne, Jul 15, 2003
    #1
    1. Advertising

  2. Mark Wayne

    Grant Wagner Guest

    Mark Wayne wrote:

    > Is is possible to use TreeMap in the javascript <SCRIPT> portion of HTML? If
    > so, how?
    >
    > Thanks,
    > mark


    The only way to use a TreeMap object would be to have a Java Applet in your page
    and use LiveConnect to transfer data between JavaScript and the Java Applet. It
    would be slow, inefficient and would probably fail in far more browsers then
    just using JavaScript by itself.

    That said, why do you need to use a TreeMap in JavaScript? JavaScript has
    associative arrays, and all the functionality of a Java TreeMap could be
    accomplished in JavaScript if you so desired, although I doubt you'd use all the
    functionality available.

    What problem are you trying to solve? Do you really require the keys to be
    sorted?

    --
    | Grant Wagner <>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *
    http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
    * http://www.mozilla.org/docs/web-developer/upgrade_2.html
     
    Grant Wagner, Jul 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sandip Chitale

    Re: JList customized with TreeSet

    Sandip Chitale, Aug 23, 2003, in forum: Java
    Replies:
    0
    Views:
    687
    Sandip Chitale
    Aug 23, 2003
  2. Rhino

    TreeSet size() Problem

    Rhino, Feb 21, 2005, in forum: Java
    Replies:
    2
    Views:
    678
    Anton Spaans
    Feb 22, 2005
  3. Rhino
    Replies:
    17
    Views:
    1,091
    Rhino
    Feb 24, 2005
  4. Stefan Ram

    Re: correct use of TreeSet

    Stefan Ram, Feb 26, 2006, in forum: Java
    Replies:
    2
    Views:
    436
    Stefan Schulz
    Feb 26, 2006
  5. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    455
    Fredrik Lundh
    Aug 13, 2008
Loading...

Share This Page