Options

For Each with ActiveX controls ...

PidiPidi Member Posts: 35
Is there really no equivalent for VBSs FOR EACH to retrieve object from a collection?

Since I realized, that table 2000000046 (Automation Servers) makes it much easier to find AvtiveX controls, since the CLSIDs are although available, I have tried even more of those. However, as soon, as it comes to collections I can´t find a way to enumerate any object within it.

As I´ve seen in JScript code, they don´t have a FOR EACH as well, but a function Enumerate(). Do we mybe have something like this in or for Navision?

Pidi
Michael Peters
Bos Fod GmbH Düsseldorf
+49 2132 139-0

Comments

  • Options
    janpieterjanpieter Member Posts: 298
    In fact VB also uses a enumerate property called NewEnum. But this property returns an iUnknown interface and i am affraid this is not supported by Navision as this property is not exposed to the calling class (in this case navision).

    So conclusion you will probably not be ablo to loop through all items in a collection like you can in VB.

    Sollution, you will need a VB wrapper to handle those kind of calls.
    In a world without Borders or Fences, who needs Windows and Gates?
Sign In or Register to comment.