Page 2 of 2

Re: Plugin documentation?

Posted: Sat Sep 14, 2019 11:08 am
by Jolbas
Thanks a lot. I was so sure I had tried just that and I got an error there was no such attribute in a StartValue instance.
Well now it works. Thanks again. Maybe thera going to be some more questions soon.

Re: Plugin documentation?

Posted: Sat Sep 14, 2019 11:17 am
by Jolbas
It's when I ask for the value before I set it I got the error

Code: Select all

leadin = operation.defaultStart.leadin
"Unable to call an unknown method 'leadin' on a 'StartValue' type."

Re: Plugin documentation?

Posted: Sat Sep 14, 2019 1:20 pm
by LesNewell
I just checked the code and I made a mistake in the .i file, which is why that doesn't work. This will be fixed in the next dev release.

Re: Plugin documentation?

Posted: Sun Sep 15, 2019 2:53 pm
by Jolbas

Code: Select all

operation.defaultStart.leadin = 10
This doesn't throw an error but it doesn't seem to change the operation settings either. Is it because of the this .i file mistake too or do I miss something else.

Re: Plugin documentation?

Posted: Sun Sep 15, 2019 6:29 pm
by Les Newell
Yeah. Lua doesn't know a StartValue is a descendant of StartPoint. However this may work:

Code: Select all

local st = operation.defaultStart:DynamicCast("StartPoint")
local leadin = st.leadin
Although Lua doesn't know about the relationship, C++ does. DynamicCast is implemented in C++ so this may well work.

Re: Plugin documentation?

Posted: Mon Sep 16, 2019 12:59 am
by Jolbas
Nop

"DynamicCast() Cannot cast a wxLua type 'StartValue' to a 'StartPoint'."

I have to wait for the update