Closed jinergenkai closed 10 months ago
Hey, I'm trying to fix this by editing the extension code, specifically for Windows
users.
Navigate to %USERPROFILE%\.vscode\extensions\undefined_publisher.nalsmobilebrain-0.10.0\dist
and open extension.js
.
Use format document
(Shift+Alt+F) to improve readability.
Inside extension.js, search for "base64").slice(3).toString("utf-8")
and replace from:
return (
(t = t.substr(0, t.length - 2)),
Buffer.from(t, "base64").slice(3).toString("utf-8")
);
return (t, t);
Create a new folder named fallbacks
inside the dist
folder, and within it, create a file named paste.vbs
. Insert the following code into paste.vbs
:
Sub CopyToClipboard(data)
Dim objHTML
Set objHTML = CreateObject("htmlfile")
objHTML.ParentWindow.ClipboardData.SetData "text", data
Set objHTML = Nothing
End Sub
Function PasteFromClipboard()
Dim objHTML, clipboardData
Set objHTML = CreateObject("htmlfile")
clipboardData = objHTML.ParentWindow.ClipboardData.GetData("text")
PasteFromClipboard = clipboardData
Set objHTML = Nothing
End Function
WScript.StdOut.Write PasteFromClipboard()
5. In extension.js, look for `Couldn't write file due to error: ${e}` and add the following line of code just before this section:
if (!e.startsWith(i.workspace.workspaceFolders[0].uri.fsPath)) e = i.workspace.workspaceFolders[0].uri.fsPath + e;
This addition should come before:
c.writeFile(e, t, "utf8", (e) => { e
? n(
new Error(
Couldn't write file due to error: ${e}
)
)
: u();
});
Error from Clipboard to Data Model tool. I use the tool
nalsmobilebrain
you shared:Clipboard to Data Model
, when Enter after entering the model name, the following error always appears "exactly" those words no matter what is in my clipboard.I use Flutter
3.13.1
andwindows
.Maybe the error comes from incompatibility with the windows clipboard, I understand you only support Macos.
Can you fix it, or share the source code of the tool. Or do I have to rewrite the tool from scratch?
I look forward to receiving feedback from you on the above issue. Thanks!