User bio
404 bio not found
Titusville FL
Member since Dec 12, 2025
Posts:
Dmitry has not published any posts yet.
Replies:

Happy New Year, Robert!

since my IRIS does not allow the 'public' word, I had to refactor the code this way:

Method jsn(jsn As %String = "")
{
    if $e(jsn)="{" {
        do ..ZPretty(jsn)
    } else {
        write "<UNDEFINED>"
    }
    quit
}

Method ZPretty(input As %String = "") As %String
{
    if $e(input)="{" {
        do ##class(%JSON.Formatter).%New().Format(input)
    } else {
        write "<UNDEFINED>"
    }
    quit ""
}

/// list of prepared tests	
Method Menu(ByRef go As %Boolean = 1)
{
	read !,"Populate Person by:",pop,!
	if pop write ?5,..iris.ClassMethodValue("ONAPI.Person","Populate",pop)
	read !,"Populate Company by:",pop,!
	if pop write ?5,..iris.ClassMethodValue("ONAPI.Company","Populate",pop)
	read !,"Populate Employee by:",pop,!
	if pop write ?5,..iris.ClassMethodValue("ONAPI.Employee","Populate",pop),!
	read !,"Show Person by ID:",pop,!
    if pop do ..jsn(..iris.ClassMethodValue("ONAPI.Person","JSON",pop)) 
	read !,"Show Company by ID:",pop,!
    if pop do ..jsn(..iris.ClassMethodValue("ONAPI.Company","JSON",pop))
	read !,"Show Employee by ID:",pop,!    
    if pop do ..jsn(..iris.ClassMethodValue("ONAPI.Employee","JSON",pop))
    read !,"Show Global PersonD by ID:",pop,!
    if $l(pop) {
	    set d=..iris.IsDefined("ONAPI.PersonD",$s(pop:pop,1:""))
	    write ?5,"$Data()=",d,!
	    if d#10 {
		    set Value=..iris.Get("ONAPI.PersonD",pop)
		    write ?5 zwrite Value  
    		}
		}
	read "Index list for Person & Employee (n,y):",pop,! 		
	if $l(pop),"Yy"[$e(pop) {
		set idx=""
		for  { 
			set idx=..iris.GetNext(1,,,"ONAPI.PersonI",idx)
			if $l(idx) write ?5,idx,!
			else  quit	
			} 
		}
	read "Exit Demo (n,y,*):",pop,!		
	if $l(pop),"*Yy"[$e(pop) set go=0
	quit
}

Great! I don't even imagine that IRIS can install packages out of community repository pm.community.intersystems.com. Thank you for encouraging me, Robert!. ZMP was not on my system but after some playing around 

and ONAPI package is compiled in my namespace! I don't see no changes in demo.cls about ^ZPretty but please keep me updated if you make a fix. It is not critical now. I like the Demo database. It is a good classical case of entity-relationships.

Happy New Year, Robert!

Dear Robert,

thank you for clarification, sir. So now it is obvious that my VS Code has spoiled (by its constant IntelliSense) the original demo.cls. It was compiling well before. Now I just replaced  demo.cls from original objectscript-native-api-0.0.1.tgz and it compiles. However, I see the warning about ^ZPretty, supposedly ZPretty.mac routine, which is not included in the archive.  I be honest, I don't remember where I download it. Now I checked with your github space https://github.com/r-cemper and don't see the Native API for ObjectScript repository at all.

In Intersystems ObjectScript blanks and tabs are not just for illustration
or visualization but are an essential part of the language with some functionality.

Now I've learned it! Thank you.

Please share the latest actual Native API for ObjectScript repository.

the one is mentioned in the README https://github.com/r-cemper/ObjectScript-Native-API.git does not work anymore.

This Demo database is very useful for starting! The demo.cls have filled up globals with test data for Person and Company in second. I'd be happy to have more classes and relations Demo database for my project. 

In my Studio such typing errors are flagged red immediately during typing.

Please share if Cache Studio works with IRIS 2025.1 and if, where can I obtain it.

Sincerely,

Dmitry

Certifications & Credly badges:
Dmitry has no Certifications & Credly badges yet.
Global Masters badges:
Dmitry has no Global Masters badges yet.
Followers:
Dmitry has no followers yet.
Following: