luacom icon indicating copy to clipboard operation
luacom copied to clipboard

handle properties using DESCKIND_VARDESC (e.g. StdFont)

Open davidm opened this issue 13 years ago • 0 comments

This fails:

std=luacom.createobject("StdFont")
std.Name="Arial"
std.Size=26
Object.Font=std

Reported by Pablo Garcia. See http://lua-users.org/lists/lua-l/2010-12/msg00009.html :

The failure in your example seems to be a problem in LuaCOM. Here, IDispatch::Invoke [1] with DISPATCH_PROPERTYPUT in tLuaCOM::call is failing with error DISP_E_BADPARAMCOUNT. The reason is that DISPPARAMS [2] is not being properly initialized because the ITypeComp::Bind in tLuaCOM::getFUNCDESC is not returning a DESCKIND_FUNCDESC but rather a DESCKIND_VARDESC, which we currently are not handling. It's not clear to me why the type info of many "properties" apparently are methods (FUNCDESC's), while others like in StdFont are variables (VARDESC's), but we'll probably need to handle this.

  • [1] http://msdn.microsoft.com/en-us/library/ms221479.aspx
  • [2] http://msdn.microsoft.com/en-us/library/ms221486.aspx

davidm avatar Mar 13 '11 03:03 davidm