There seems to be a generous use of ClassMethods in ObjectScript code generally. I hope my own experiences aren't representative, but I bet they are. Forgive me for giving away the ending of this article, but in short: don't use them. Unless you can make a pretty convincing case that you have to, just never use them.1

What is a ClassMethod? In an ObjectScript class, you can define methods in two different ways: in a Method, you must instantiate an instance of the class to call the method, and in a ClassMethod, you can call the method without instantiating the class. Of course, in a ClassMethod, you don't have access to any properties of the object (because there's no object), but you can access globals (they are global, after all) and Parameters (which are class constants).

2 3
0 32

Hi, Community!

Building integrations with InterSystems products? Find out about the latest UX enhancements available in version 2025.3!

Building Integrations: A New User Experience Version 2025.3

https://www.youtube.com/embed/oDFS0k38_ik?utm_source=youtube&utm_medium=social&utm_campaign=oDFS0k38_ik
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

0 0
0 13