lua-users home
lua-l archive

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


Hi Dean,

This feature was already in the LuaCOM trunk, with a slightly different syntax: "array of float" instead of "array|float".

--
Fabio Mascarenhas

On Wed, Apr 21, 2010 at 5:44 PM, Dean <sessile@sbcglobal.net> wrote:
Dean <sessile <at> sbcglobal.net> writes:

>
> I suspect that the table of coordinate pairs I'm passing is not
> being coerced into the "SafeArrayOfPoints" (of type 'Single') that
> AddPolyline requires. Can this be done with stock LuaCOM?
>

Found a potential solution.

http://lists.luaforge.net/pipermail/luacom-developers/2009-September/000009.html

Applied the patch, adjusted my test program:

- local line = xlSheet.Shapes:AddPolyline({{25, 100}, {100, 150}})
+ local t = {Type="array|float",
+            Value={{25,100},{100,150},{150, 50},{25,100}}}
+ local line = xlSheet.Shapes:AddPolyline(t)

And successfully created a triangle!

Regards,
Dean.