My code is working well, but I don't find it very smart, if someone
could give me some leads ...

;(function($) { // create closure
// constructor:
        $.dict = {
                keys : [],
                hash :  []
        };

// iterator:
        $.dict.iterator = {
                idx : -1,
                self : $.dict // static pointer on my current constructor not
elegant a nicer way?
        };
...

I would prefer something like this

$.dict = {
        keys : [],
        hash :  [],
        iterator : {
                idx : -1,
                self : how to get the parent ?
        }
};

any idea?

Reply via email to