?
Solved

VB collections as LotusScript collections

Posted on 2003-02-19
8
Medium Priority
?
1,129 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:Gunsen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7982882
Try Forall x in coll.Values

-Arun.
0
 
LVL 63

Accepted Solution

by:
Zvonko earned 800 total points
ID: 7982953
Try this:


Sub Click(Source As Button)
     Dim coll As Variant
     Set coll = CreateObject( "Scripting.Dictionary" )
     
     coll.Add "a",1
     coll.Add "b",2
     
     Forall x In coll.Items()
          Print x
     End Forall
     Forall x In coll.Keys()
          Print x
     End Forall
End Sub

Good luck,
Zvonko

0
 
LVL 3

Author Comment

by:Gunsen
ID: 7986003
Forgot the ()  :(
Thx :)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Author Comment

by:Gunsen
ID: 7986025
BTW: Do you know why the Forall wont enumerate coll ?

Forall x In coll
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7986632
Good one Zvo. I just wanted to post some comments to see how this question goes...

Hee Hee Hee !

:-)
Arun.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 7988558
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

0
 
LVL 3

Author Comment

by:Gunsen
ID: 7988896
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) ...
0
 
LVL 3

Author Comment

by:Gunsen
ID: 7988909
Arun ur in the mood i guess, cheers!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question