Question John Kumpf · Oct 16, 2019

Hi all,

This might be a stupid question, but I'm going to ask it anyway. 

My goal is to write a scss file, pack it as part of a local library (Something like my_library.tgz), npm install that library into a different project and then import that scss file in one of the scss files in the new project.

Simply having the scss file exist in the library before I pack it didn't seem to work; the file wasn't under node modules after the npm install.  Am I doing something wrong, or are there extra steps I have to take?

Thanks in advance.

5
0 5899
Discussion John Kumpf · Sep 30, 2019

Hi all,

Over the next few months I'm going to be setting up continuous integration via Jenkins for some Angular UI's.  The goal is to, on each build:

1. build the code

2. run the unit tests and get a report

3. get a code coverage report

Just wanted to poll the community in case someone else has already worked with any of this before.  All ideas are appreciated.

Cheers,

Johnny

7
0 491
Question John Kumpf · Apr 23, 2019

Here's my current attempt:

Class Testing.PropertyParameters Extends %RegisteredObject
{
Property p1 As %String(MAXLEN = 5, myPropName = "myPropValue");
Method test()
{
   set ..p1 = 10
   //write ..p1.Parameters
   set p1 = ##class(%Dictionary.PropertyDefinition).%OpenId("Testing.PropertyParameters||p1")
   zwrite p1
   do p1.Parameters.SetAt("myPropValue", "myPropName")
   set key = ""
   for {
      set item = p1.Parameters.GetNext(.key)
      if (key = "") {
         quit
      }
   write !,"key: ", key,", Item: ",item
   }
   do p1.%Save()
   write ..p1.%GetParameter("myPropName")
   write !
}
}

I've visited:

4
0 654
Question John Kumpf · Apr 12, 2019

Referencing this post:

https://community.intersystems.com/post/producing-json-sql

I'm not sure how to actually interact with the result set I get from doing something like this.  I want to return something like:

[{"field1":1, "field2":2}, {"field1":2, "field2":10}]

I'm finding it very difficult to get it in this format, since %Print appends a newline onto the end of the {} object it prints.

Here's the closest I've gotten:

set query = "select JSON_OBJECT('field1': field1, 'field2":field2) from MyTable where x=? and y=?"

5
3 1443
Article John Kumpf · Jan 14, 2019 2m read

This is a quick note on what happens when, on your CSP page, you call a cache script which returns a %Boolean and store that value in a javascript variable.

When you call a script with language="cache" and returntype="%Boolean" from a javascript script, the return value is interpreted as a string, not as a boolean.

Here's an example:

A cache script that returns (in theory) a "false" value:

<script language="cache" method="giveMeAFalse" arguments="" returntype="%Boolean" procedureblock='1'>
return 0
</script>

A javascript method that logs what the value's actually interpreted as:

3
0 608
Question John Kumpf · Dec 6, 2018

Hi guys,

I'm running a method on an instance of Cache 2010, which, when compiled, has $$$OK in it's .int code.  This line throws an error, telling me that "the OK macro isn't recognized". 

Some things I've tried;

- I looked it %occStatus, and the macro definition of OK is there.

- I changed $$$OK to 1 by hand in the .int code.  It compiled successfully, but each time I recompile the original class, it's going to put that $$$OK back

- I tried Include %occStatus at the top of the class.  The .int code was unchanged when I did this (is my syntax on that wrong?)

4
0 543
Question John Kumpf · Dec 6, 2018

Hi guys,

Mostly the title.  Let's say my commands are stored in a text file "inFile".  Here was my best guess:

<dir to iris> console IRIS2018 <inFile

For reference, here's an example of the analogous structure that works on Cache:

C:\InterSystems\Cache2018\bin\cache -s C:\InterSystems\Cache2018\mgr -U <namespace to start as> <inFile

1
0 1118