Working with Zedgraph and Colors

Aug 16, 2014 at 12:18 AM
I'm trying to use NeoLua in comibination with Zedgraph (.NET charting, for my project. In particular, I'm having troubles with a call to AddCurve():

It expects a label (string), points (Zedgraph IPointList), color (Color), and symbol (Zedgraph SymbolType). When I attempt this call, I get the following error:

LuaRuntimeException: No conversion defined from Color to LuaType

I believe this is an issue with the Color going back up, since I can do the following without trouble:

local l_black = clr.Color.Black

I've worked around this by making a proxy for this call that takes a string for the color, so no show stopper, but it would be a little cleaner for me to skip this step. Is my usage correct incorrect in any way?
Aug 16, 2014 at 7:06 AM
Interesting problem. I missed something in the auto convert stuff.

An other work around until I find a solution.
const Color typeof System.Drawing.Color;",
return clr.LuaDLR.Test.LuaTypeTests:GreenColor(cast(Color, Color.Green));
I am still on the problem.
Aug 16, 2014 at 7:19 AM
Edited Aug 16, 2014 at 8:03 AM
Oh, I was wrong. This works on my project well.
TestCode("return clr.LuaDLR.Test.LuaTypeTests:GreenColor(clr.System.Drawing.Color.Green);", true);
The reason is, that I used the type in the project one time before the lua call.

I have to do something with the type resolver.

Done in Changeset 31202.