I want to override the Get and Set methods of a class property. The class maps to a pre-existing global. The property is defined like so:

Property Invalid As %Library.Boolean;

with the property mapping to a node like ^GLOBAL(Code,"INVALID")=1
Code is a property in the same class.

The value can be 0 or 1 or the node might not exist. When it doesn't exist I want the value of the SQL field to come out as 0 (false).

2 12
0 1.5K

Cache 2015.2

I need to get a sort order stored in my database with mutiple decimal places, but I want the string stored and retrieved EXACTLY as I enter it. so if someone enters 700.3000 I don't want cache to treat it as a decimal and strip the trailing zeros storing it as 700.3

once it comes back, I want the sorting to sort AS STRINGS, again, none of that stripping training/leading zeros.

this ay, I can create local arrays in exactly the order they think? they created them

0 3
0 439
Question
· 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"")

2 1
0 314

Let's say that we wish to store the documents sent to us via all of our Customers, and that the documents could be in PDF, spreadsheet, RTF, plain text, Comma-Separated-Values and XML.

It would be hoped that %Stream.Object would be a good choice of property to hold these documents, especially as you would expect %Stream.Object to morph between BINARY (for PDF, spreadsheet, RTF) or CHARACTER (for plain text, CSV, XML) depending on which type of stream was being persisted.

0 3
0 403
Article
· Jul 18, 2016 15m read
Remote proxy objects via dynamic dispatch

This article created as side effect of preparations to the longer set of articles about simple, but still handy MapReduce implementation in Caché. I was looking for relatively easy way to pass arguments to (potentially) multiple targets via remote calling facilities. And after several attempts I have realized that we do have very powerful mechanism in the Caché ObjectScript which might be of particular help here – dynamic dispatch for methods and properties.

7 7
0 1.1K

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?

1 6
0 374

NewBie's Corner Session 3 More Read and Write commands & Multiple commands

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out the commands.

Write command with carriage return and line feed

When the exclamation point "!" is inserted after a Write command, a carriage return and line feed combination is produced. Note in this example, that a comma separates the exclamation point from the variable "X".

0 1
0 483
Closed

Customer is using an ancient MSM based client Workstation for their application and they made a small change to their server code. They introduced property of %Double() and discovered an issue. The MSM workstation is not able to retrieve any property of an object instance that holds value of $double(0). see images illustrating the issue.

I'm posting this to DC intentionally before I eventually send it to WRC so others can comment.

Dan

Image 1 - data

image 2 - UI

0 1
0 480

Hello,

I am still a beginner with COS and am struggling with these concepts. While digging through the official documentation will eventually tell you everything you need to know, getting started is nevertheless not an easy feat...

Is it possible to create a "lists/array/multidimensional 101" page for beginners? And, for instance, its interaction with $data, what it means to use "as list of something" or "as array of something", how to walk lists, how to add/remove elements, how to extract sublists etc?

1 12
0 514
Question
· Jun 1, 2016
Activating an index

I have a production system that has a large dataset of about 2 million rows. I need to create an index on a property but don't want it available to queries until the index is fully populated. Is there a way I can create the indexed, fire off the build, then "activate" the index so queries can use it.

0 3
0 399

NewBie's Corner Session: 5 Operator Precedence

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out the commands.

Order Precedence means the order in which mathematical operators are executed. In a Mathematical expression, you may have Multiplication, Addition, Subtraction, and Division. Which of these are executed first, second, third, etc.?

The basic Operator Precedence of mathematics is:

0 0
0 328
Question
· May 16, 2016
Roman Number Converter

Hi,
My name is Sergio Fernandes and I'm from Brazil.
I would like to know how can i use MVBasic at Cache Terminal or .csp.
My original problem is to converter Integer Numbers to Roman Numbers and consulting cache documentation I found "Conversion Codes" at http://localhost:57772/csp/docbook/DocBook.UI.Page.cls?KEY=GVRF_basicfea...
My version is Intersystems Ensemble 2013.1.6.950.0
Thanks a lot,

Sérgio Fernandes

0 3
0 372

Greetings! This article describes yet another simple way of creating installers for the solutions based on InterSystems Caché. The topic covers applications, which can be installed or completely removed from Caché with one action only. If you are still documenting installation instructions that have more than one step to do to install your application — it’s high time you automated this process.

5 14
0 1.6K

I was writing a routine that called some class methods and when I typed in ##class( and the package, there was a drop down list of all the classes that match that package but when I selected one of the dropdown entries it added the package name again.

For example if I enter ##class(dim.

I am presented with a list of classes in the dim package but when I selected one of them,(dim.OccupationList), what ended up in the editor was

##class(dim.dim.OccupationList

1 1
0 378