:: Forum >>

hi, a BIG Bug? (II)

^.^

begin, read these codes for here:
==============
<script>
Object.prototype.haveProperty=new Function('p','return typeof(this[p])!="undefined";');

var
arr = [1,2,3];

for (i in arr) document.writeln(i, '<br>');
</script>
==============

now, you know, Object's prototype will attch to Array, Enumerator, Date and all Objects. but, in this file :
-----------
ActiveWidgets v0.23sourcelibsystemhtml.js

line 137, your code:
-----------
for(i in docs) {
e = docs[i].getElementById(id);
...
}

==========
so, a BIG Bug raise from next code:

<script>
Object.prototype.haveProperty=new Function('p','return typeof(this[p])!="undefined";');

// or Array.prototype.xxxxxxxxx =
</script>
<script src='activeui/activeui.js'><script>

<script>
var obj = new Active.Controls.Grid;
document.write(obj);
</script>

----------
I'm sorry, my english is no good. :(
AimingZhou
Saturday, December 27, 2003
Basically you are saying that I should never use "for .. in .." statement in the library. Personally I don't like the idea of modifying global Object class - however I'll try check that ActiveWidgets still works even if you do such things.
Alex (ActiveWidgets)
Monday, January 5, 2004

This topic is archived.


Back to support forum

Forum search