[Gambas-user] Not an Object (Collection)

John Dovey dovey.john at gmail.com
Sat Jun 19 23:57:00 CEST 2021

I define a collection and later add a value to it:

Dim WorkCmd As New Collection ' Leaving out the "new" makes no difference
WorkCmd.Add(Date(Now), "BoneDate")

When I try to check for an existing key, it tells me it's "Not an Object"
Print "Date: ", WorkCmd["BoneDate"] ' <-- This works
Print  WorkCmd["BoneDate"] '<-- This works
Print WorkCmd["BoneDate"].Exist '<-- This doesn't
If Print  WorkCmd["BoneDate"].exist then '<-- This gives the same error

[image: image.png]

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210619/43befe7b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 7755 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210619/43befe7b/attachment.png>

More information about the User mailing list