Page 1 of 1

Custom UI EditValue fails to set to empty

Posted: 04 Jul 2016, 00:55
by tmalheiro
Dear coppelia,

I have tried without success to set the value of a EditValue component of a customUI from the external plugin to an empty string.

Code: Select all

simExtCustomUI_setEditValue(ui, 1004, "")
the result is
Lua runtime error: [string "SCRIPT CustomUI_Script"]:269: expected string when reading input argument 3 (value) (simExtCustomUI_setEditValue @ 'CustomUI' plugin)
stack traceback:
[C]: in function 'simExtCustomUI_setEditValue'
[string "SCRIPT CustomUI_Script"]:269: in main chunk

Best,
Tiago

Re: Custom UI EditValue fails to set to empty

Posted: 04 Jul 2016, 17:40
by coppelia
Hello Tiago,

yes, this is a known bug, which has been corrected for next release.
You have 3 possibilities:

1) avoid empty strings by using a space instead
2) recompile the plugin your self. You can find the updated source code of the UI plugin here. But the bug happens in the v_repStubsGen part, located here (you will need to fetch both repositories to recompile everything). The bug correction is documented here.
3) you can also contact us and we will send you the ready to compile source code. What OS are you on?

Cheers

Re: Custom UI EditValue fails to set to empty

Posted: 04 Jul 2016, 19:13
by tmalheiro
Dear Coppelia,

Thank you!
I am using Windows10, but I can wait for the new release.

Best,
Tiago