Plugin documentation?

Request and discuss new features
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Plugin documentation?

Post 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.
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Plugin documentation?

Post 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."
LesNewell
Posts: 905
Joined: Sat May 13, 2006 2:34 pm

Re: Plugin documentation?

Post 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.
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Plugin documentation?

Post 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.
User avatar
Les Newell
Site Admin
Posts: 3661
Joined: Thu May 11, 2006 8:12 pm

Re: Plugin documentation?

Post 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.
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Plugin documentation?

Post by Jolbas »

Nop

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

I have to wait for the update
Post Reply