Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

VB collections as LotusScript collections

Posted on 2003-02-19
8
Medium Priority
?
1,149 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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

580 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