Page 1 of 1

bug? obj.GetCapacity() != result in ahk v1

Posted: 25 May 2019, 02:01
by hyaray

Code: Select all

o := {"a":"aa","b":"bb",2:"c","c":"d","e":"f"}
MsgBox(o.GetCapacity() . " " . o.Length() . " " . o.Count()) ;5 2 5
in ahk v1, return 8 2 5 :headwall: :headwall:

by the way, is there a build-in method to know a var([1,2] or {"a":"aa",2:"bb"}) is object or a array??
thanks a lot!!! :xmas:

Re: bug? obj.GetCapacity() != result in ahk v1

Posted: 25 May 2019, 04:12
by Helgef
5 is sufficient for your example, if you relied on it being 8 in v1, that would be a bug in your code.

You may want to have a look at this topic :arrow: Objects - preview of upcoming changes.

Cheers.