Article Rustam Ibragimov · Sep 4, 2018 4m read UDL support Have you ever thought why the code that you write in Caché Object Script is exported to an XML file? #Caché #Development Environment 3 1 0 1.2K
Question Rustam Ibragimov · Sep 17, 2016 Compare time Hello, guys.Say I have two horologs or timestamps, how can I compare them? I know that just time1 > time2 doesn't work because it will compare them as strings which is not correct. #Object Data Model #Caché 2 6 0 3K
Question Rustam Ibragimov · Sep 9, 2016 Trimming... 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 #Caché #ObjectScript 1 6 0 1.9K
Question Rustam Ibragimov · Sep 6, 2016 Output object fields to string Hello, guys.Is there a way to get all object properties, parameters and so on and put it inside a string. I know that I can use zw obj, but this does not work if I want to put it inside a string. #Object Data Model #Caché 1 3 0 908
Question Rustam Ibragimov · Aug 30, 2016 Get to know the format 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 $$$NOelse return $$$YESHowever, is there a better way? #Object Data Model #Caché 2 4 0 360
Question Rustam Ibragimov · Aug 12, 2016 Export and Import Web Files Hello, guys. I need to find all web files, get their content in UDL format and to be able to export them. And, vice versa, to be able to import them in udl format. I know that they are located in CSP folder. However, is there any way to do this using COS functions? #Data Import and Export #Object Data Model #ObjectScript #Caché 1 2 2 665
Question Rustam Ibragimov · Aug 5, 2016 Using streams with Russian language 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) #Object Data Model #Caché 1 3 0 400
Announcement Rustam Ibragimov · Aug 4, 2016 UDL highlighting in Atom text editor 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-cosInstallation: #ObjectScript #Caché 3 0 0 552
Question Rustam Ibragimov · Jul 26, 2016 Find mapped file 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"") #Object Data Model #Caché 2 1 0 342
Question Rustam Ibragimov · Jul 21, 2016 Create dfi files (dashboards) programmatically Hello, guys. Is there a way to create a dashboard programatically?I have a source code of a dashboard in udl format and I need to somehow import it in my project. %Compiler.UDL.TextServices works only with classes and ##class(%Routine).%New("dashboard.dfi") doesn't work as well. #Object Data Model #Caché 1 1 0 413
Question Rustam Ibragimov · Jul 20, 2016 Get classname from udl based file Hello, guys. I want to add a class to my project. This class is in UDL format. I know that there is a method: ##class(%Compiler.UDL.TextServices).SetTextFromStream. The problem is that to use this method I need to know the name of the class (including all packages) in advance. But, a class can have any name(I mean C:/source/AAA/BBB/CCC.cls, but the real name is Sample.Human.cls).For now I found only one way to get to know the name of a class - just parse the class code and search for a word which is followed by "Class" word. Is there any better way to do that? #Object Data Model #Caché 1 6 0 409
Question Rustam Ibragimov · Jul 15, 2016 How to write into Cache classes, routines etc Hello, guys. I have an external file that contains data in UDL format(as in Studio, not XML) and I need to somehow overwrite my source file with that file. I tried to use this snippet for .mac file #Object Data Model #Caché 2 4 0 561
Question Rustam Ibragimov · Jul 13, 2016 Access namespace files Hello, guys! I want to get access to the folder where all files of the namespace are stored using COS. I found a way to get access to class files and found a folder where all csp, html, css etc files are stored. However, is there any folder which contains all files(even .mac and .int)? Or, probably, there is a method which gives all files content? #ObjectScript #Caché 1 2 0 382
Question Rustam Ibragimov · Jul 12, 2016 How to access routine Hello, everyone!I opened one project and there I found such lines as $$Export^%occXMLExport(filename,"-d /diffexport",InternalName) #Caché #Code Snippet #ObjectScript 1 3 0 727