Have you ever thought why the code that you write in Caché Object Script is exported to an XML file?


The news is that it’s time to change. Starting from the release of Atelier, a new development environment, and Caché 2016.2, you will be able to export and import files in the format that you use in the studio, into the so-called UDL (Universal Definition Language) format. You can now write code that is not only fast but also looks beautiful in the exported form. However, we get another equally serious issue: if all new projects are in the UDL format, what will happen to backward compatibility?


Let’s get started


InterSystems treats the topic of backward compatibility very seriously, so we have decided to breathe new life into old projects and give them UDL support as well

Last comment 4 September 2018
0 1
227

views

+ 2

rating

Hello, guys. 

I found one interesting moment in Cache Object Script. It doesn't have(or at least I didn't find) trimming function. By trimming I mean if a string has some whitespaces/tabs/carriage returns from very beginning or/and from very right, this function removes them. 

  I have found several workaround ways. 

1. Using Cache Basic

ClassMethod TrimCacheBasic(str As %String) As %String [ Language = basic ]
{
Return Trim(str)
}

2. Using SQ

Last answer 9 September 2016 Last comment 30 September 2016
0 1
525

views

+ 1

rating

I know that Cache files can be stored as XML and UDL based files. Is there any way to determine in which format the file(class, routine, dfi and so on) is stored? Because you can easily name your XML based file as class.cls and it will be perfectly valid. 

I know that one way to check whether this file is in XML format is just try to parse it like 

Set st = ##class(%XML.TextReader).ParseStream(contentStream)

if $$$ISERR(st) return $$$NO

else return $$$YES

However, is there a better way? 

Last answer 30 August 2016 Last comment 30 August 2016
0 1
174

views

+ 2

rating

Hello, guys.

I need to copy the text from one stream to another filestream and save it. I am using  

do fileStream.CopyFromAndSave(rtn.Code)

However, if "rtn" stream contains Russian characters I get something like "???". Is there any way to convert stream to Unicode?  Something like $zc(str, "O", "UTF8") for streams.

Last answer 5 August 2016 Last comment 3 October 2016
0 1
180

views

+ 1

rating

Hello, guys. 

We have recently created a syntax highlighting for COS for Atom text editor. You can find it on https://github.com/intersystems-ru/atom-language-cos

Installation: 

  1. Download or clone this repository
  2. Copy everything to ~/.atom/packages/
  3. If you have your Atom editor open, then you need to reload it (enter  Window: Reload in Command line)

It's been few days since the release, so please if you find a bug, let us know through creating an issue or forking and making a pull request. 

P.S. After it gets more or less usable, we will use this syntax as a basis for GitHub highlighting for COS.

0 1
0

comments

308

views

+ 3

rating

Hello, guys.

I have a set of file names (e.g. file.cls, file2.mac and so on) and I need to check whether these files are mapped in %ALL or current namespace.

I found that if I open Globals in the current namespace I can see mapped packages. And If I open this global I see all files that are  to this namespace and %SYS. The problem is these files are enumerated in a json object(apparently)

ex. "{""class"":{""%Activate.Enum"":{},""%Activate.GenericObject"":{""CreateObject"":0,""GetObject"":0},""%Activate.HandleEvents"")

But, is there a way to determine whether this file is mapped using some method? 

P.S. Probably, I can just use $find(textInGlobal, filename)

Last answer 26 July 2016
0 1
0

comments

140

views

+ 2

rating