Hi,
I've been running into something that strikes me as pretty annoying (esp
since I don't know how to work around it).
It concerns the extension of Object and the usage of Maps.
Following a snip I use to extend the Object object.
Object.prototyp e.extend = function (oSuper) {
for (sProperty in oSuper) {
this[sProperty] = oSuper[sProperty];
}
};
This all goes fine. The function available etc.
Here is the catch.
When I create ab arr=new Object() to be used as a Map or an arr=[] to be
used as a Map (as well) I can fill the arr. No problems so far.
When I use the for (o in arr) { ... } I keep on tripping over the the fact
that "extend" is a key with {ScriptFunction } as value.
Obviously this is *not* what I'm looking for.
Am I doing something wrong here and if so what?
Trying to rewrite my code every time this comes up is starting to ...
TIA
F DCG
I've been running into something that strikes me as pretty annoying (esp
since I don't know how to work around it).
It concerns the extension of Object and the usage of Maps.
Following a snip I use to extend the Object object.
Object.prototyp e.extend = function (oSuper) {
for (sProperty in oSuper) {
this[sProperty] = oSuper[sProperty];
}
};
This all goes fine. The function available etc.
Here is the catch.
When I create ab arr=new Object() to be used as a Map or an arr=[] to be
used as a Map (as well) I can fill the arr. No problems so far.
When I use the for (o in arr) { ... } I keep on tripping over the the fact
that "extend" is a key with {ScriptFunction } as value.
Obviously this is *not* what I'm looking for.
Am I doing something wrong here and if so what?
Trying to rewrite my code every time this comes up is starting to ...
TIA
F DCG
Comment