go to post Dmitry Maslennikov · Feb 26, 2016 Looks like, you need something based on two-factor authentication, but I don't sure that current realization allow expand variants yet, and you can use only SMS or QR varaints.
go to post Dmitry Maslennikov · Feb 25, 2016 You may call RunTest with /noload parameter, but you still have to set a valid directory as a value in ^UnitTestRoot Set ^UnitTestRoot = "C:\UnitTests" Do ##class(%UnitTest.Manager).RunTest("mytests:MyPackage.Tests", "/noload/nodelete") Or so, here you can specify: suit, class and method if you want Do ##class(%UnitTest.Manager).DebugRunTestCase("mytests","MyPackage.Tests","","") This call does not load any classes from any directories nor does it delete any classes from Caché. And executes the tests contained in MyPackage.Tests. The optional third argument is for specifying an individual test method within the test class to execute.
go to post Dmitry Maslennikov · Feb 24, 2016 Hi Kenneth,I've been working in company where we develop WEB-based ECM application. It's a quite big one, and very flexible. We do not use CSP-files at all, only CSP-classes, no Zen. And some my own projects on Caché, also in WEB. I will not recommend to use CSP-files, or Zen. I can't say anything about Zen Mojo, just because when I last time saw it, it was not so better then Zen, now with Native JSON it may be better. I'll recommend CSP-classes, REST and webservices.CSP-Pages. It may be usefull, with all of their tags and stores with files. But unfortunately all of this files, may some time confuse developer, because in any way developer should know is it compiled or not, when some files were changed, it may looks like nothing changed. And at the end anyway it compiles to CSP-classes. ZEN. With ZEN, you get some ready components. In the same time, your application became too big, even if it not, and have just one page. It generate js/css files, and you should care about that files, while you deploy app to production. Data transfered from server to client side, contains waste js code.With CSP-classess, I have flexibility, and can generate different parts of page in very different parts of code. I have much more possibilities to control how I generate HTML, receive and response requests. But I still generate html-code in Caché.As well we have more than 1MB CSS and JS files. For me it is not so comfortably to edit that files in Studio. For HTML in classes I can use embedded &html<>. JS and CSS files I'm editing in Sublime Text. But I'm sure that in modern time application should be SPA, all html should be in static files, and server should speak only in JSON, with a REST and wevservices. And in all my last web-projects, I'm using this way. Static HTML, JS, CSS files, with a Gulp I transform all sperate JS and CSS files to one, implement that files to HTML. And for production version I put all that files in one Class. In this case I can send one XML file which contains full application. For example CacheBlocksExplorer
go to post Dmitry Maslennikov · Feb 22, 2016 Hello Albert, thanks, and I sent pull-request with %XGEN variant
go to post Dmitry Maslennikov · Feb 18, 2016 Yes, it is possible, but you should be ready to change it after all updates of Caché Read about it in documentation - Localizations In first you should export current localization DO ##class(%Library.MessageDictionary).ExportDomainList("messages_sqlcode_en.xml","%SqlCode","en") here %SqlCode, it as a domain for Sql Codes. And any language which you want to change. then you can change any text in this xml, and should keep all off tags with their Id attribute, if you delete some tag, you will loose their localization. And then you can import your new localization. As it system localization, you have to allow writing to CACHELIB database. do ##class(%MessageDictionary).Import("<code class="COS">messages_sqlcode_new_en.xml") You have to remember that it is a system localization, and InterSystems can change it, add or remove anything here, and in every new version, you should follow theri changes. Or much simple way, it just set new value directly to the global. USER>set ^%qCacheMsg("%SqlCode","en","SqlCode139") = "TEST Concurrency failure on update: row versions not the same" USER>Write $SYSTEM.SQL.SQLCODE(-139) TEST Concurrency failure on update: row versions not the same
go to post Dmitry Maslennikov · Feb 17, 2016 There are some ways to concat values in a cloumn in Caché: CONCAT and STRING.CONCAT concatenates two strings to return a concatenated string. You can perform exactly the same operation using the concatenate operator (||).STRING converts one or more strings to the STRING format, and then concatenates these strings into a single string. No case transformation is performed.
go to post Dmitry Maslennikov · Feb 16, 2016 Interesting highlighting error, such code fails all lines of code below set $p(@$na(^tmp("test")),",",1)="val"
go to post Dmitry Maslennikov · Feb 16, 2016 Cool markdown, is nearly here.Well, but it is not so clear, that Disable rich-text, means markdown.But there are some errors, in markdown.~~strikethrough~~, >! spolier does not work at all,A [link](http://example.com). shows as A http://example.com">link. When I press Preview button, in editing new post, after reload, editor opens in rich-mode and brakes all my markdown. And I think we need preview button, or live preview for markdown in comments.
go to post Dmitry Maslennikov · Feb 16, 2016 Just because, I wanted to split getting full index location, and generated code.
go to post Dmitry Maslennikov · Feb 16, 2016 You can calculate such property on a class side, something like this. Index by CitizenRef and RelocationDate, and method which looking for the next date, and returns true if nothing found. Index CitizenRelocation On (CitizenRef, RelocationDate); Property IsLastKnownRecord As %Boolean [ Calculated, SqlComputeCode = {set {*}=##class({%%CLASSNAME}).IsLastKnownRecordCheck({CitizenRef}, {RelocationDate})}, SqlComputed ]; Method IsLastKnownRecordGet() As %Boolean { quit ..IsLastKnownRecordCheck(i%CitizenRef, i%RelocationDate) } ClassMethod IsLastKnownRecordCheck(CitizenRef As %Integer, RelocationDate As %Date) As %Boolean [ CodeMode = objectgenerator ] { set storagename="Default" set storageInd=%class.Storages.FindObjectId(%classname_"||"_storagename) set storage=%class.Storages.GetAt(storageInd) set indexLocation=storage.IndexLocation set indexLocation=$name(@indexLocation@("CitizenRelocation")) do %code.WriteLine($c(9)_"quit $order(@($name("_indexLocation_"))@(CitizenRef, RelocationDate))=""""") quit $$$OK } And result you can see below
go to post Dmitry Maslennikov · Feb 15, 2016 When macrocomment appeared in the same line with continue, next line will be marked as an error for i=1:1:10 { continue:condition ##; comment set a=1 } Interesting example I've found in Ens.Util.Time GoTo $Case(spec ,"a":getWeekdayAbbrev ,"A":getWeekdayFull ,"b":getMonthAbbrev ,"Z":getTimezoneName ,:getX)
go to post Dmitry Maslennikov · Feb 15, 2016 Cache for Windows (x86-64) 2016.2 (Build 595U) Wed Feb 10 2016 19:12:54 EST Action `Delete` in context menu by project items, no works after first use. Deleting three thousands of items at once leads to Atelier does not respond. In project folder nothing changes. And all that time CPU in ~70% and about 2Gb memory
go to post Dmitry Maslennikov · Feb 15, 2016 I just have found that $system.OBJ.Load() supports loading in an UDL format. And found $system.OBJ.ExportUDL() which can export classes and routines in UDL format. So, it means that we can easily organize work in Studio and in Atelier at the same time. What we should, it is to export all files in Studio hook at the same manner as it doing Atelier. With this new possiblility, will be much easier to migrate from Studio to Atelier. Thanks.
go to post Dmitry Maslennikov · Feb 15, 2016 Well, we got very exciting feature. But how about some more methods for arrays, such as: $unshift, $pop, $shift, $concat, $join, $slice ? It would be very helpful. And as we have $listbuilds in Caché, I want to easily convert it to json array like below set array = ([]).$from($lb(1,2,3)) do array.$toJSON() [1, 2, 3]
go to post Dmitry Maslennikov · Feb 12, 2016 As you may already know, tables in Caché is a classes. And Class defintion stores in %Dictionary Package. SELECT * FROM %Dictionary.PropertyDefinition where parent='Sample.Person'
go to post Dmitry Maslennikov · Feb 12, 2016 Ok then, how to manage to get it worked with REST in Caché. For example. My application uses REST dispatch class for csp application. This class returns static files from disk in development, or from XData in production. And then I need to use WebSocket as well, but all requests catch by REST class. And in REST route map, i want to have path '/websocket', and send it to my WebSocket class.
go to post Dmitry Maslennikov · Feb 8, 2016 Sure, you cando label^routine(arg1, arg2)set result=$$func^routine(arg1, arg2)