Ciaran!

You need to setup a connection to every workspace in VSCode.

Place your mac file into any folder. Preferably into 

/mycoding/testproject/src/myOSFile.mac

Then open this /testproject/src folder in VSCode.

Then go to VSCode Preferences and find CachéObjectScript settings section. It is what is used by default. If your current project differs from the default (e.g. another server connection or namespace) place it into UserSettings section on the right. Like it is shown in this gif:

You can check the connection in Output window of the terminal with name cos. 

Or you can just try to save any file - it tries to compile on save and will popup you the results.

HTH

Hi Sean! Moved the discussion to the Other group.

4,800+ are the registered members, stats. We also have about 20,000 unique DC visitors monthly.

From them we have about 3,000 visitors who come directly to the site - so we can assume as "real" developers who reads/writes on DC daily. But this touches only the English world.  And not all of them know about DC. 

My evaluation is 10,000-15,000 developers worldwide.

E.g. last the IT Planet contest in Russia this year gathered 2,400 participants for InterSystems contest (mostly students). Should we count students as developers? Today maybe not, but tomorrow... 

Ed, it's not about speed, but about syntax sugar on "for cycles". you can go like that: 

 
/// do ##class(POI.Test).main() 
ClassMethod main(rounds As %Integer = 1000, size As %Integer = 10, nullPercent As %Integer = 20) {
 set list = ..getList(size, nullPercent) 
 write !,"Rounds: ", rounds 
 write !,"Size: ", size 
 write !,"NullPercent: ", nullPercent 
 write !,"List: " 
 zwrite list
for way="listnext", "listfind", "lfs", "base" {

  set start = $zh set list2 = $classmethod(,way, rounds, list)

  set end = $zh set time = end - start 
 write !,"Way: ", way 
 write !,"Time: ", time 
write !,"List: "
 zwrite list2

  write ! }

If you don’t use Studio, you can consider to try isc-dev tool, which is intended to simplify routine processes of import/export code, releases and patches.

Import it to e.g. USER and map to %All.

After that you’ll be able to import, export, release and patch in any namespace.

To work in a given namespace point the tool to a directory on the disk which contains repository in UDL or XML classes (preferablly UDL) with the following command:

d ##class(dev.code).workdir(“/work/github/myproject/src”)

Use following to import the code:

d ##class(dev.code).import()

To setup the mask introduce isc.json file into .../src folder with following content:

{“compileList”:”A*.INC,B*.CLS,C*.CLS,D*.DFI,E*.GBL”

”projectName”:”myproject”

”git”:0}

Example

Call Init class to let dev.code use settings in the given namespace:

d ##class(dev.code).init()

After that you’ll be able to export all the project in one file with the release command:

d ##class(dev.code).release()

it will export all into one /mgr/database/myproject_release_ddmmyyy.xml file.

Once you commit your changes to git repo you’ll be able to have a patch release. Call

d ##class(dev.code).patch()

to get all the changed code into one patch release in /mgr/database/myproject_patch_ddmmyyyy.xml file.

To export all source code (including DeepSee staff)  in UDL and organized in folders call:

d ##class(dev.code).export()

And call compile method to compile everything in your project, but not the whole namespace:

d ##class(dev.code).compile()

One of the projects which is maintained with this util is dsw-map: classes, globals, DFIs, releases.

  
  
  

Hi, Jaqueline!

@Sam Duncan is right below, and please don't consider my example above!

See the updated version of the method for Cube class:

classmethod UnitLevel(unitID, level) as %String {

s unit=##class(Police.Unit).%OpenId(unitID)

if '$IsObject(unit) return ""

return $Case(level,

  1:unit.UNI_PADRE.UNI_PADRE.UNI_PADRE.%Id(),

  2:unit.UNI_PADRE.UNI_PADRE.%Id(),

  3:unit.UNI_PADRE.%Id(),

  4:unit.%id(),:"") }

Introduce the dimension with 4 levels, with expressions:

1 st level:

%cube.UnitLevel(%source.%ID,1)

2nd level:

%cube.UnitLevel(%source.%ID,2)

3 and 4 levels same idea.

AND!!! The key thing!

introduce a calculated or direct field in your class which will indicate a level of the row - say H_LEVEL with values 1,2,3,4 according to the level of administration.

and introduce a build restriction to the cube with:

H_LEVEL=4

So, there would be only 4th level records in the cube, but you'll gather all other needed calculations and values using your hierarchy.

Hi, Peter!

I would warn you of NOT including storage information in Git (or any other CVS).  It is the must to keep class storage definition within source control.

Consider you have a system in production where you have class A with properties P1 and P2 with data.

And you developed a new version of a product with the optimization when you don't need P1 anymore and delete it. And you added a new feature which needs to add property P3

 You deploy new class  A with P2 and P3 properties on a production system. Storage would be generated upon class definition and you will get the following:

All reads from P2 would deal with former P1 data.

All reads from P3 would read former P2 data (yes, you will get P3 initialized by former unexpected P2 data).

So you'll get some unexpected behavior and bugs with this.

Solution:

keep the storage definition within a class and in Git.

Maybe delete a property is a bad practice but sometimes we are doing that.

HTH

Hi, Stephen!

Thanks for raising it!

This button with a strange glyph is for uploading images only to be placed in a post.

I forgot, that we left the option to upload files - we plan to turn it off.

Would you please share why do you need the option of file uploading for the posts?

IF there is a good reason we can enhance the feature instead of dropping it.