Custom UI EditValue fails to set to empty

Report crashes, strange behaviour, or apparent bugs
Post Reply
tmalheiro
Posts: 29
Joined: 27 Nov 2015, 22:53

Custom UI EditValue fails to set to empty

Post 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

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Custom UI EditValue fails to set to empty

Post 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

tmalheiro
Posts: 29
Joined: 27 Nov 2015, 22:53

Re: Custom UI EditValue fails to set to empty

Post by tmalheiro »

Dear Coppelia,

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

Best,
Tiago

Post Reply