Hi,

I know you're doing a big effort to build a new IDE in Eclipse ecosystem but Visual Studio Code is a new an even better and faster tool for coding... did you have any plans to release any COS extension for it in the near future? There you can already find extensions for all current more common progrmaming languages and it would be great to have COS as one of them.

Thanks

2 5
0 1.4K

I need to convert an array with an unknown number of indices to a JSON string for transmission (which is why it isn't possible to iterate through it using $ORDER). Does ObjectScript provide functionality to convert an array to a JSON string?

Edit 1: As Joel mentioned, the array is subscripted and has an arbitrary structure like:

a(1)="a"
a(3,4)="b"
a(3,6)="c"
a(5,6,7)="d"

which needs to be converted to

0 6
0 1.4K

Has anyone called any outside Javascript code from inside their class files? I asked a long time ago if there was a way to manipulate an image within Cache Object Script, and since Cache doesn't have any image libraries its not really possible. However I have found Javascript to resize an image and wonder how hard it would be to mesh the two together.

Can anyone share any examples?

Thanks

Scott

2 9
1 1.4K
Question
· Aug 1, 2017
PDFs and Reading them

I know there are numerous Java libraries available to scan a PDF meta data, but is there a way to scan a PDF using native cache object script? We are looking to take a PDF from an external vendor, scan for meta data, create the HL7 message, and embed the PDF within the HL7 message.

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

0 2
0 1.4K
Question
· May 18, 2016
Ensemble HTTP OnProcessInput

I am just trying to make a quick hand off HTTP production. I have the class built and compiled onto the server and the production is running as a service. When the production is called (by an inbound job) I can see that the HTTP.InboundAdapter is being used successfully and the stack continues all the up to ProcessInput where OnProcessInput is called in Ens.BusinessService.

0 15
0 1.4K
Question
· Oct 18, 2017
Rebuild class index

I have a class. In class there is an index. This index is for quick search on name property.

Class User
{

.....

Property Name as %String;

Index NameInd On Name;

.....

}

This class is mapped to some global ^GL(userId) = "Name*other data....****"

And there is also index global ^GLNameIndex(Name, userId) = ""

When I add new User entry through class, f. i.

S user = ##class(User).%New()
S user.Name = "Some name"
​D user.%Save()

calling method %Save() adding new entry to index automatically.

0 6
0 1.3K

This is probably a very naive question but :
Is it possible to create a Windows executable file from a Cache MUMPS (COS) routine, such that the routine can be run directly from Windows ?
If so, could some kind soul direct me to a source of information that describes the process.
I am using the free Intersystems Cache installation (CachePCkit V2017.1) on Windows 10 for my own use & personal development.

Thanks

0 13
0 1.3K

Hello everybody,

My question would be, how is the recommended way to access Windows shares, also in view of future demads. Of course, I'm also happy about an explanation or code snippet of how the library, which is mentioned in the following , can be used under cache.

The classic jcifs library is easy to use, also with Cache, but as microsoft ceases support for smb1, we are currently looking for alternatives. jcifs-ng is such a library, which we took a closer look at. In java code a jcifs-ng file operation looks like this:

0 3
0 1.3K

Hi,
I've organized my repository using TortoiseSVN. I was careful to use only svn commands while creating my file structure. Now all Subversion commands are working at the command line but not from within my IDE (Cache Studio). Basically I'm trying to write a plug-in for my IDE to use Subversion from within the Studio. Trying to integrate Subversion into my IDE, something like Subclipse, but for Cache Studio. The error occurred after reorganizing my code into directories. For example at the command-line, svn info and svn status and all other commands work perfectly. All Subversion commands work at the command prompt!

0 8
0 1.3K

Hi, folks!

Suppose you have a Caché class with %String property which contains relatively large text (from 10 to 2000 symbols).

The class:

Class Test.Duplicates Extends %Persistent 

{

Property Text As %String (MAXLEN = 2000);

}

And you have thousands of entries.

What are the best options to find entries which are duplicates on this property?

0 26
1 1.3K

Hi All,

I am new to webservice and UPS. I have tried the sample URL's that UPS have given for testing in PHP codes and it works just perfect for me.

But when i try to hit the same URL's in Ensemble. it gives some errors from UPS.

If anyone of you guys here has any knowledge about UPS integration or the webservice please help me. it will be much appreciated and helpful.

The ensemble code that i am trying with is,

0 5
0 1.2K

How can I prevent large number truncation when using the DynamicObject and DynamicArray classes to create JSON in objectscript and then parsing the result in javascript. Are there any global settings that configure the output when using these classes?

I am looking at converting to the new DynamicObject and DynamicArray classes to build JSON. Our current (homegrown) JSON library forces string representation of numbers too long because of errors we were seeing with long numbers being truncated on the client, I am hoping to accomplish the same with the new classes.

0 2
0 1.2K

I have the following problem:

  • There are several classes with method generators, which needs to be compiled during every compilation
  • I have "ckub" qualifiers enabled in studio
  • I don't want to remove "u" qualifier because I need it very much in another namespaces

So how do I force classes with method generators to recompile when "u" qualifier is present?

0 2
0 1.2K

Hi,

I have a global that holds users name and date of birth.

I would like to loop through them and check if the date of birth is more than 2 years based on todays date

so I have ^checker("under2", "Eric David", "02-05-2018")

I want to check the birthdate based on todays date to see if it is greater than 2. How do I access the birthdate in the global

Please can you advice

I tried :

0 9
0 1.2K

Hi,

Thanks for your time.

Plain $ZF(-1) and $ZF(-2) calls from Cache Studio or Terminal have stopped launching the OS shell from Win10.

cmd (Windows Command Prompt) should be launched.

Configuration:

Windows 10 Anniversary Update, Ensemble 2016.2.0.585.0 Developer Edition x64

Is this common? I have enabled both %Developer role and a Cache CallOut privilege for all users that operate in this scenario.

In Terminal, W $ZF(-1) prints -1, W $ZF(-2) prints -1

In Studio, W $ZF(-1) hangs the IDE, W $ZF(-2) prints 0

0 2
0 1.1K

I am trying to read some binary data from a local file or through socket.

The binary data is like H.264 codec, I need to read data BYTE by BYTE (even BIT by BIT) and decide the next step based on the data read so far.

I check the documentation and it seems like most of the sample focus on human readable IO, ie: LINE by LINE.

Could I achieve my goal through COS?

Thanks.

0 3
0 1.1K
Question
· Aug 25, 2017
Runtime type detection

SOLVED

tl;dr how can you tell if a number is really a string

The original question has been updated/improved.

Equality comparisons on floating point numbers will produce different results...

"1.1"=1.1 //is true!

"0.1"=0.1 //is not true :(

This second comparison can be fixed with...

+"0.1"=+0.1 // is true!

0 31
0 1.1K

Is it a good practice to set the MAXLEN value of %Library.String property type? Will it lead to wasted storage if its not really using it?

For example, I have to store a 5 characters long string into the below str field. Which of the statement is recommended?

Property str As %String;

vs

Property str As %String(MAXLEN="5");

0 2
0 1.1K