then i should get the CVS version
:)
-----Original Message-----
From: Robert Rainwater [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 6:23 PM
To: Bogdan Pietroiu
Subject: Re[2]: [Dynapi-Dev] getAll() function
Your right, but that code is obsolete anyways. When using a for (i in
j) loop, it is indexed by the name correctly (which is how it is in
CVS).
--
Robert Rainwater
On 6/27/2001, 11:16:48 AM EST, Bogdan wrote about "[Dynapi-Dev] getAll()
function":
> do you agree or disagree with what i said ???
> -----Original Message-----
> From: Jordi Ministral [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 27, 2001 5:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Dynapi-Dev] getAll() function
> Hey, just looked into the latest code and it reads:
> for(var j in temp) ret[j] = temp[j];
> That is correct. What version are we talking about ? ( Why do I always
> end up asking this same question ? )
> Bogdan Pietroiu wrote:
>>
>>
>> wrigth now, the function looks like this
>>
>> (in dynapi.js)
>>
>> DynObject.prototype.getAll = function() {
>> var ret = [];
>> var temp;
>> var l = this.children.length;
>> for(var i=0;i<l;i++) {
>> ret[this.children[i].id] = this.children[i];
>> temp = this.children[i].getAll();
>> for(var j=0;j<temp.length;j++) ret[j] = temp[j];
>> }
>> return ret
>> };
>>
>> do you notice the for statement after the recurent call to get all
???
>>
>> it inserts layers into ret array, but not indexed by there name ....
>> this is a serious bug , boys ....
>>
>> i guess the function should look like this ....
>> DynObject.prototype.getAll = function() {
>> var ret = [];
>> var temp;
>> var l = this.children.length;
>> for(var i=0;i<l;i++) {
>> ret[this.children[i].id] = this.children[i];
>> temp = this.children[i].getAll();
>> for(var j=0;j<temp.length;j++) ret[temp[j].id] =
>> temp[j];
>> }
>> return ret
>> };correct me if Im wrong ...
>>
>>
>> Bogdan Pietroiu
>> IT Specialist
>> MIS Department
>> Flamingo Computers SA
>> tel: +40-1-236.2002
>> fax: +40-1-236.2004
>> e-mail: [EMAIL PROTECTED]
>> web: www.flamingo.ro
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev
smime.p7s