Link to home
Start Free TrialLog in
Avatar of Gunsen
Gunsen

asked on

VB collections as LotusScript collections

This sample will go ok using VB's For Each statement).  Why does LotusScript return error: Not a collection object !?

Dim coll As Variant
Set coll = CreateObject( "Scripting.Dictionary" )
     
coll.Add "a",1
coll.Add "b",2
     
Forall x In coll
  Print x
End Forall
Avatar of Arunkumar
Arunkumar

Try Forall x in coll.Values

-Arun.
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gunsen

ASKER

Forgot the ()  :(
Thx :)
Avatar of Gunsen

ASKER

BTW: Do you know why the Forall wont enumerate coll ?

Forall x In coll
Good one Zvo. I just wanted to post some comments to see how this question goes...

Hee Hee Hee !

:-)
Arun.
At the moment I get no notifications from EE. I just sow on the ranking that you granted me points :-)

So the answer to this coll question is: you defined coll as an Object. This object does have several properties and methods.
The methods Keys() and Items() yield enumeration of values.

Good luck,
Zvonko

Avatar of Gunsen

ASKER

Me neither, and nice answer.
The methods get the job done.
But, why dont the Forall do the job ?
I cant figure out, seems to me that LS or the Domino client is forcing me to use other (unknow to me) libraries for accessing COM/OLE object /s*uck) ...
Avatar of Gunsen

ASKER

Arun ur in the mood i guess, cheers!