Brett Saviano · Jun 20, 2024 go to post

I'm not familiar with all of the Zen specific methods in that class. For working with JSON outside the Zen framework though (for example, in REST APIs), new code should use Dynamic Objects.

Brett Saviano · Jun 20, 2024 go to post

@Alin Soare 
What "auto-formatting" are you referring to? Can you provide before and after screenshots showing what gets changed on save?

Brett Saviano · May 15, 2024 go to post

@Lukas Dolezal 
VS Code's View Other command supports jumping to the same line in the INT routine, but that support requires an InterSystems server with Atelier API version 4 or above (Cache 2018.1.6+, IRIS 2019.1.2+, 2020.1.1+, 2021.1+). If you're not using one of those versions then the location mapping won't work.

Brett Saviano · May 9, 2024 go to post

An important detail about the independent Studio is that it is installed in its own directory, so it won't be uninstalled when you upgrade/add/remove IRIS instances on your system. Also, since the 2024.1 Studio is forward-compatible, you won't need to update it every time a new IRIS version is released.

Brett Saviano · Apr 9, 2024 go to post

You can use your second example above, then copy the content into a new %Stream.GlobalBinary:

Do strm.Rewind()
Set o = {}, o.strm = strm, strm2 = o.%Get("strm",,"stream>base64")
Set strm3 = ##class(%Stream.GlobalBinary).%New()
Do strm3.CopyFrom(strm2)
Brett Saviano · Mar 22, 2024 go to post

@Richard Rayburn 
There isn't an equivalent to the Inspector's Storage editor in VS Code yet. That's on our roadmap but we don't have an ETA for it yet due to design challenges. You will have to edit the Storage block directly in the class's text. There is hover documentation and code completion support for Storage blocks in VS Code, which Studio did not have:

I hope you find this helpful.

Brett Saviano · Mar 1, 2024 go to post

@Kevin Kindschuh 
If you're using client-side editing (files on your local file system controlled by GIT directly), you can export HL7 schemas from the InterSystems Explorer view. They will be in the "Other" section:

Brett Saviano · Mar 1, 2024 go to post

Since this issue can't be reproduced by you on another server, or by me with a fresh install of your adhoc, I think it's highly unlikely that there's a product defect. I think this is an issue with that specific instance only. The WRC should be able to help you investigate this further.

Brett Saviano · Feb 29, 2024 go to post

I tried to reproduce your issue with your exact server version and I couldn't get the error to occur. Do you remember when this started happening? Does debugging work when you connect to other instances?

Brett Saviano · Feb 26, 2024 go to post

Yes, that is very helpful. The <COMMAND> error is coming from a line that calls "Do <debug_target>", which in this case is "##class(prosthetic.ProstheticResourceTest).RunTests()". Does running "Set a = "##class(prosthetic.ProstheticResourceTest).RunTests()" Do @a" work from the terminal in that namespace or do you see the same <COMMAND>?

Brett Saviano · Feb 21, 2024 go to post

@Evan Gabhart 
No, you can't import .rtn files and we have no plans to add that. Other than the SMP, you can use the VS Code integrated terminal to open an IRS terminal, or the WebSocket Terminal to import the .rtn files. I would recommend using a different format for your exports though, like XML or UDL.

Brett Saviano · Feb 9, 2024 go to post

Thanks for the screenshots. I've never seen that happen before. I just booted up my windows machine and tried to reproduce that behavior but couldn't. If you delete the src/index.csp file and then save src/goerke/index.csp, does src/index.csp re-appear? Do you see any errors or messages in the ObjectScript Output channel?

Brett Saviano · Feb 9, 2024 go to post

I'm not sure what you mean by "it recreates the file in the root directory of the namespace". Can you post a screenshot? Also, can you describe in more detail what you're trying to test? We will be able to give better advice with more context.

Brett Saviano · Feb 9, 2024 go to post

@Daniel Goerke 
What learning course/training steps are you following? Do you mean to be creating CSP files? CSP files need to be stored inside a web application so they can be served by the web server. They can't be created as standalone files without that context. Therefore, you need to have the CSP file in folders that tell VS Code what web application it goes it. For example, if you want to create mypage.csp in web application /csp/user, the path to the file inside your local workspace should be something like src/csp/user/mypage.csp. You may also find it easier to edit web application files directly on your IRIS server using server-side editing.

Brett Saviano · Feb 9, 2024 go to post

Thanks for your feedback! In response, I've submitted Pull Request #1311 which removes the comment-continuation feature for ObjectScript comments (it's still enabled for class description /// comments). It also adds auto-closing of C-style block comments (e.g. typing /* automatically adds */ after the cursor). You can try this out by downloading and installing the latest beta version of the vscode-objectscript extension from GitHub, which can be found here.

Brett Saviano · Jan 29, 2024 go to post

Hi @Mathew Rimmington, thanks for following up with your solution! That is a creative way to solve the problem and I encourage you to submit your code as a Pull Request to the vscode-objectscript extension. It is a community tool so we would happy to include your code if it improves your experience. The contributing guide can be found here.

Brett Saviano · Jan 25, 2024 go to post

Hi @Mathew Rimmington, this exact question was asked in a GitHub discussion a few weeks ago. To summarize my answer there, this isn't easy to add because the text that gets added on enter (besides indentation) is static. It acn't be generated from the regular expression used to match the previous line, so I couldn't dynamically add the correct number of dots. My recommendation is to use modern brace syntax instead of legacy dot syntax.

Brett Saviano · Jan 24, 2024 go to post

@Nicki Vallentgoed 
You can convert the HttpResponse.Data into a %DynamicObject without using an intermediate stream:

Set jsonob = ##class(%DynamicObject).%FromJSON(httprequest.HttpResponse.Data)
Brett Saviano · Jan 19, 2024 go to post

@Joseph Griffen 
ZWrite is going to output the internal format of the %Status value, which isn't that easy to parse visually. $SYSTEM.Status.DisplayError() will output the status text to the current device in a more readable format.

USER>Write ##class(%Atelier.v1.Utils.General).ValidateDocName("project.prj",.sc)
0
USER>ZWrite sc
sc="0 "_$lb($lb(16006,"project.prj",,,,,,,,$lb(,"USER",$lb("e^ValidateDocName+33^%apiSRC^2","e^ValidateDocName+1^%Atelier.v1.Utils.General.1^1","e^^^0"))))/* ERROR #16006: Document 'project.prj' name is invalid [ValidateDocName+33^%apiSRC:USER] */

USER>Do $SYSTEM.Status.DisplayError(sc)

ERROR #16006: Document 'project.prj' name is invalid [ValidateDocName+33^%apiSRC:USER]

If you need to store the status text in a variable you can use $SYSTEM.Status.GetErrorText().

Brett Saviano · Jan 18, 2024 go to post

Sorry, I see that now! Have you checked your server connection information and made sure you have the correct host, port username and password?