I'm working with VS Code on Centos 8. When I install the ObjectScript extension the installation succeeds, but the InterSystems icon never appears in the left-side panel. I can change settings for the extension - set the server info, etc. No errors show-up in the VS Code debug log.

UPDATE: the same thing happens on MacOS when using VS Code 1.46.1 and InterSystems ObjectScript extension 0.8.6

Can anyone suggest next steps for me to troubleshoot? Is there another log I should check?

1 3
0 697

In cache studio there are features, dialog boxes, that help map data from a global to class properties.
I have used %CacheSQLStorage quit a bit, or have in the past, to map globals to classes.

I haven't been able to find a similar feature in VisualStudio.
Do I need to upgrade to IRIS to be able to use VisualStudio to map global properties to classes?

Thanks for your time,
Richard

1 2
0 61

A new Health Connect customer has a few experienced Java folks on their interface team. As they get more into Health Connect and learn Caché ObjectScript they thought it would be useful to have a list of common Java statements with an equivalent statement in ObjectScript. They mentioned string manipulation as an example, but would be interested in other areas as well.

This seems like something that is probably already floating around somewhere. Does anyone have something like this or other "COS jumpstart for Java devs" materials?

Thanks,
Marc

1 1
0 401

Is there any way that I can check the native type of an object script variable? (similar to the typeof check in javascript)

I see that the DynamicArray class uses the type of the variable for its output, I would like to do something similar when I receive a value as an argument to my method.

USER>s var1 = 123 //No quotes, number type

USER>s var2 = "123" //quotes, string type

1 3
0 560

Way back when during our Siemens LCR days we had to limit the number of characters in OBX.5 to a length of 75. That was back when we had eGate.

Now I need to do the reversal of that and take loop through a string length and split the string up into multiple OBX or NTE based on a certain length. In reading documentation $EXTRACT can do this if you know the exact length, but in this case we don't.

So how would one loop through a string and say every 75 characters create a new OBX or NTE segment?

Thanks

Scott

1 7
0 2.4K
Question
· Nov 3, 2016
Simple Arithmetics

Can somebody explain this behaviour of Cache (and many other calculating machine as well) :

WRITE 1/3*12

4

WRITE 1/3*5

1.666666666666666667

W 1/3*18

5.999999999999999999

W 1/3*21

6.999999999999999999

W 1/3*24

7.999999999999999999

How can we make more occurate caculations in Cache ?

1 2
0 635
Question
· Apr 10, 2019
Base64 Encoding Errors

I am trying to base64 encode a string with non standard characters encoded in utf-8 also tried windows 1252 and I am getting error like so

ERROR <Ens>ErrException: <ILLEGAL VALUE>zEncodeStream+18^ -- logged as '-' number - @' set encString = $TRANSLATE($SYSTEM.Encryption.Base64Encode(streamString),$C(10,13))' 

any help appreciated if anyone has faced this before

1 2
0 686

Hello all, I have a question about constucting thousands of clones, and scope.

In my code, I'm looping through a database, say 200k+ objects, and creating a clone of each object (we need to evaluate a modified clone of the object, but not account for what's on disk).

I see this a lot in the documentation:

1 7
0 540

Languages like Java and C++ allows to develop a multi-threaded program with two or more parts that can run concurrently and each part can handle a different task at the same time making optimal use of the available resources specially when your computer has multiple CPUs. Is it possible In ObjectScript? If yes, Where I can get a good sample or application?

1 5
0 664

Hello,

I need to run some clean up routine in the background so loss of my terminal session won't stop the process.

I found the JOB command in the documentation.
JOB | ObjectScript Reference | InterSystems IRIS Data Platform 2022.1

When I try it, it doesn't seem to be doing much. I also expected this to become visible in the Background Tasks but that doesn't happen either.

Probably I am missing something.

1 5
1 274
Question
· Aug 17, 2023
ICMP/Ping with ObjectScript

Is it possible to "Ping" a remote host in IRIS for Health using ObjectScript? We host hundreds of TCP connections over hundreds of VPNs. I'm working on a project that would make it nice to have way to ping remove clients over the VPN to monitor connectivity and keep the tunnels alive.

Another thought/method would be to make an OS system call (AWS Linux), but I don't see a way to do that either.

1 9
1 255
Question
· Jun 7, 2016
Atelier bracket problem

We have noticed that when compiling with Atelier (either Atelier itself or sending the code through the REST interface) that the build will fail if all brackets '() {} []' are not closed. This includes brackets opened in comments.

For example, this will fail:

class myclass

{

//if someVar {

}

I do not know if this issue has been fixed or if this issue has been brought up, but it has been a nuisance over here.

1 3
0 319

Is there a straightforward workflow in VS Code for moving a class from one namespace to another on the same server? With Caché/IRIS Studio, it was a (sort of) simple export/change namespace in file menu/import operation. But in VS Code it's not obvious (to me, at least).

I can add multiple namespaces to a workspace, but when using isfs:// paths I see only a "Download" option and no "Upload" or "Import/Compile." When I'm navigating the local file tree, I see Import options, but no way to select the namespace into which I want to import.

1 8
0 1K

Hello,

It is time for me to eat my own dog's food and start implementing unit test running with coverage :) I will be inundating IRC with questions at this point, but I have a more general question first.

In this tutorial, it is supposed that your unit tests are exported as XML first... But that's not very practical. Is there a way, instead, to run all tests from a given project without having this export?

My first thought on how to do this would be to:

1 3
0 566

Here's an easy one for you; before I spend another hour looking for the answer, how do you convert %ArrayOfDataTypes to an array (that could, say, fit into the %session.Data array, or maybe just some array named info()), and of course back again?

NS>s aodt=##class(%ArrayOfDataTypes).%New()

NS>w aodt.SetAt("lcavanaugh","username")
1
NS>w aodt.SetAt("organization","coolcompany")
1
NS>w ##class(%ArrayOfDataTypes).BuildValueArray(aodt,.array)

<LIST>zBuildValueArray+1^%Library.ArrayOfDataTypes.1

1 3
0 943