Page 1 of 1

[v2.beta.5] Clone Map with CaseSense off

Posted: 25 Jun 2022, 05:36
by aseiot
Demonstrated as follow:

Code: Select all

x := mMap("KEY","Value1")
y := x.Clone()
y["KEY"] := "Value2"

for k,v in y{
	MsgBox K "," V                               ; Suppose prompt once, actually twice with same key
}

class mMap extends Map
{
	CaseSense := 0, Default := ""
}

Re: [v2.beta.5] Clone Map with CaseSense off

Posted: 07 Jul 2022, 09:53
by aseiot
I think mFlags was not correctly set when clone a Map;
Change the

Code: Select all

obj.mFlags = obj.mFlags;
to

Code: Select all

obj.mFlags = mFlags;
fix this issue

Re: [v2.beta.5] Clone Map with CaseSense off

Posted: 07 Jul 2022, 22:08
by lexikos
Oops :lol:

Yes, that sounds right.

Re: [v2.beta.5] Clone Map with CaseSense off  Topic is solved

Posted: 13 Jul 2022, 04:01
by lexikos
aseiot's fix is included in v2.0-beta.7.