Page 1 of 1 1
Topic Options
#162756 - 2006-06-02 05:43 AM Bug with arrays returned from objects
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Hi All,

IMHO KiX doesn't correctly deal with arrays returned from objects.

Code:
$=SetOption("NoVarsInStrings","On")

? Test[1] ; equals b

Function Test()
$Test = "a","b"
EndFunction

$d = CreateObject("Scripting.Dictionary")
$d.Add("a",Split("a b"))
If VarType($d.Item("a")) & 8192
? '$d.Item("a") is an array'
EndIf
$a = $d.Item("a")
? $a[1] ; equals b
? $d.Item("a")[1] ; should return b but instead throws an error
Get $



Some may not consider this not to be a bug but rather that this syntax is simply not supported. However, it seems logical to me that KiX should evaluate $d.Item("a")[1] to "b".

Regards,

Richard

Top
#162757 - 2006-06-05 10:08 AM Re: Bug with arrays returned from objects
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Testing shows that Kix2001.400 is the only version that does not exhibit this bug.

Edited by It_took_my_meds (2006-06-05 10:08 AM)

Top
#162758 - 2006-06-05 10:36 AM Re: Bug with arrays returned from objects
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
What is Kix2001.400

The latest version is:
4.52 Release Candidate 1
4.52.0.0 build 215

Top
#162759 - 2006-06-05 05:13 PM Re: Bug with arrays returned from objects
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kix2001.400 must be kixtart 2001 version 4.00
_________________________
!

download KiXnet

Top
#162760 - 2006-06-06 01:09 AM Re: Bug with arrays returned from objects
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
That's correct.
Top
#162761 - 2006-06-16 01:37 PM Re: Bug with arrays returned from objects
Ruud van Velsen Moderator Offline
Developer
*****

Registered: 1999-05-06
Posts: 391
Loc: Amsterdam, The Netherlands
Another excellent find!

This kind of syntax is indeed not supported in the current versions. Changing this is non-trivial, so I will not do so for 4.52, but I will look into it for the next update.

Thanks for the fine research!

Ruud

Top
#162762 - 2006-06-19 02:33 AM Re: Bug with arrays returned from objects
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Thanks Ruud
Top
#162763 - 2006-06-19 07:00 AM Re: Bug with arrays returned from objects
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes, I always thought that this buggie boo is one that we just have to live with.
but glad to hear it isn't so.
_________________________
!

download KiXnet

Top
#187122 - 2008-04-21 01:37 AM Re: Bug with arrays returned from objects [Re: Ruud van Velsen]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Bump
Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1447 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.042 seconds in which 0.017 seconds were spent on a total of 13 queries. Zlib compression enabled.