User bio
404 bio not found
Member since Jul 25, 2017
Posts:
Replies:
My guess is, because abstract classes (%CSP.Page is an abstract class) can't be instantiated, your subclass lacks the generator methos for property initialisation.
But there is a simple solution:
Class Your.Page Extends (%RegisteredObject, %CSP.Page)
{
Property Name As %String [ InitialExpression = "Joe" ];
}
Well, the world is right again
set page=##class(Your.Page).%New()
write page.Name --> Joe
Ha ha ha 😂, that's a big mistake. Those are old functions (for even older applications, maintained for backward compatibility only) in the mean time all replaced by the $list...() functions.
Certifications & Credly badges:
Julius has no Certifications & Credly badges yet.
Global Masters badges:







Followers:
Following:
Julius has not followed anybody yet.
Oh yes, you are able to create an instance of
Class Your.Page Extends %CSP.Page { Property Name As %String [ InitialExpression = "Joe" ]; }
class because the inheritance goes as follows:
Your.Page <-- %CSP.Page <-- %Library.Base <-- %Library.SystemBase
and the %Library.SystemBase donates you the %New() method.