lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I'm trying to get LuaCOM to work, and having some problems... has anyone had
any success enumerating collections?  For example, I'm trying to get a list
of drives:

    fso = luacom.CreateObject("Scripting.FileSystemObject")
    drives = fso.Drives

This returns a collection object, as expected.  I can index them by name:

    cdrive = drives:Item("C")

But numeric index does not seem to work (and as far as I can see, should do)

    firstdrive = drives:Item(1)

    LuaCOM Exception in file tLuaCOM.cpp at line 661: COM exception: The
parameter is incorrect.
    COM exception: The parameter is incorrect. (file tLuaCOM.cpp, line 661)

I also cannot seem to get a working enumerator object.  How do I do this?
drives:GetEnumerator() doesn't exist, and drives:_GetEnum returns a userdata
object, with nothing I can call.  The metatable for this object seems to
onbly contain "eq" and "gc", and the gc seems to crash...

Is there any way I can actually enumerate a collection, as it is really hard
to do a lot of things without this facility.


Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software