You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling nk.NkEditString (or NkEditStringZeroTerminated) the nuklear wrapper will send the underlying slice Data out to C, but it never updates the length of the buffer. So if the user edits the string in the editbox, the buffer that the Go code has will always have the same length and won't update properly.
A quick hack that I created to get around the problem is to wrap the function and return a new string from the buffer (which could be improved to only create the string when necessary, but this was just a proof of concept).
When calling nk.NkEditString (or NkEditStringZeroTerminated) the nuklear wrapper will send the underlying slice Data out to C, but it never updates the length of the buffer. So if the user edits the string in the editbox, the buffer that the Go code has will always have the same length and won't update properly.
A quick hack that I created to get around the problem is to wrap the function and return a new string from the buffer (which could be improved to only create the string when necessary, but this was just a proof of concept).
The text was updated successfully, but these errors were encountered: