Closed daimor closed 5 years ago
@davbro63 could you share the peace of code and place, hovering which you getting this error?
The code is Class User.Test1 Extends %RegisteredObject {
Method Method1() As %Status { set a = $get(^B) }
}
Hover above the open brace under the Method declaration and the error appears in the Log (Extension Host) window
On Tue, 2 Jul 2019 at 10:20, Dmitry Maslennikov notifications@github.com wrote:
@davbro63 https://github.com/davbro63 could you share the peace of code and place, hovering which you getting this error?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/daimor/vscode-objectscript/issues/42?email_source=notifications&email_token=ACWXRRTDMF4C4ALUSCCM5C3P5MMW7A5CNFSM4H4ZX4EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZAURTI#issuecomment-507594957, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWXRRVPNHKWV24GKK5PMBTP5MMW7ANCNFSM4H4ZX4EA .
Thanks, fixed
Probably a separate bug, however when I hover above a command / intrinsic function ($get etc.) I see the information display - nice work. Hover over a non-word and the log shows [2019-07-02 10:02:15.770] [exthost] [error] TypeError: Cannot read property 'end' of undefined at ObjectScriptHoverProvider.dollars (c:\Users\Administrator.vscode\extensions\daimor.vscode-objectscript-0.7.11\out\providers\ObjectScriptHoverProvider.js:25:133)
Reviewing the typescipt I see: public dollars(document: vscode.TextDocument, position: vscode.Position): vscode.ProviderResult {
const word = document.getWordRangeAtPosition(position);
const text = document.getText(
new vscode.Range(new vscode.Position(position.line, 0), new
vscode.Position(position.line, word.end.character)),
);
Probably needs some defensive coding around the word object before it's used.
On Tue, 2 Jul 2019 at 09:38, Dmitry Maslennikov notifications@github.com wrote:
Originally posted by @davbro63 in https://github.com/daimor/vscode-objectscript/issues/41#issuecomment-507592846