Question Stephane Devin 路 Jul 29

Hi, 
I have a code that copy a method to another class for analysis purpose.

I also want this method to appear first in the source code to easily use it in VSCode with the classmethod debug button and not search it in the numerous method of the modified class.
Is there a way to do such a thing?
I tried the placeAfter keyword but I can't find a way to make it really work as I want. Is their other ways to control the order of methods?

0
0 0
Question Stephane Devin 路 May 17, 2024

Hi, I was working with %sStream.FileBynary and following the doc when I find an info that I'm not sure of.In the part of the doc where it talks about saving streams, it does not precise where it is saved.I tried to fill my stream, then rewind, then set the file and finally saved.And it puts in my default directory with the temporary name.If I do a zwrite of my stream, I get these properties about the file and directory.(StoreFile) = "zKc2m8v1.stream"(NormalizedDirectory) = "C:\InterSystems\Community\mgr\user\stream\"I figured it was maybe because I used a relative path while using LinkToFile.

0
0 323
Question Stephane Devin 路 Apr 10, 2024

Hi,

I am using embeded python to utilize some pythonic library but i got a problem on my hand.
One of the python function i am using return multiple values

in python you would do something like that :

val1, val2, val3, = function(params)

In COS I got something like that :

lib = ##class(%SYS.Python).Import("lib")
val1 = lib.function(params)

And I don't know how to get the second and third values.
Is there a way to get them?

0
0 206
Question Stephane Devin 路 Dec 14, 2023

I got a problem to resolve, to sum it up I need to extract a function body from a JS file with cos.
I already got the JS code in a string and the function name but I'm kinda stuck as to how to get my function body, I already tried a few things (regEx, counter bracket) but there are comment and strings that block them from functioning. Is there a javascript parser or a good way to do it except by creating a javascript parser?

8
0 473