Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onCut & onCopy write "null" (string) into clipboard if the callback is null #139

Open
MoritzBrueckner opened this issue Mar 4, 2020 · 0 comments

Comments

@MoritzBrueckner
Copy link
Contributor

MoritzBrueckner commented Mar 4, 2020

When using the Krom backend for Kha, "null" is written (as a string) into the clipboard when the cut/copy callbacks are null (which is the default value). Instead, nothing should happen, the current clipboard value should remain.

I tried to localize the problem but I couldn't solve it.

I assumed that some code in Kore or Kinc was wrong and did not handle a null value, but running the VS debugger showed that the JSValueRef arguments of krom_set_cut_copy_paste_callback() are not null, although JSValueRef can hold a null value according to the documentation.

So I tried changing the types of [cut/copy]Listener in System.hx from Void -> String to Null<Void -> String> (also in the definition of notifyOnCutCopyPaste() and in Krom.hx) because compiling with @:nullSafety(Strict) led to warnings.
This had no success, only the warnings are gone now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant