objectscript

Intersystems caché - programmatically create new class

大憨熊 提交于 2020-01-05 02:30:50
问题 Is it possible to write ObjectScript method, which will create new class in namespace and compile it? I mean programmatically create new class and store it. If so, can I edit this class using ObjectScript later(and recompile)? Reason: I have class structure defined in string variable and I need to add new class to namespace according this string. 回答1: Nothing is impossible. Everything in Caché can be created programmatically. And, Classes is not a execution. There are at least two ways to do

How to set %Dictionary.StorageSQLMapDataDefinition.RetrievalCode?

不打扰是莪最后的温柔 提交于 2019-12-12 01:52:27
问题 How can I do this: <Data name="hyperlink"> <RetrievalCode> <![CDATA[set res="" set colId="" for { set colId = $order( ^ohtest("mltab","main","Dta",{L4},colId) ) quit:(colId = "") set indexTab = $g(^ohtest("mltab","main","Dta",{L4},colId,"Index")) if indexTab'="" { set res = res_"<hyperlinkIndexTab><colId>"_colId_"</colId><iTab>"_indexTab_"</iTab></hyperlinkIndexTab>" } } s {hyperlink}=res]]></RetrievalCode> </Data> programatically? I have: set global = "^ohtest" set iTab="main" //hyperlink