Skip to main content

Saving the Data Type Class

At this point, the method looks like this:


ClassMethod LogicalToDisplay(%val As %Integer) As %String 
[ CodeMode = generator, ServerOnly = 0 ]
{
    Quit (%val \ 60) _ "h" _ (%val # 60) _ "m"
}

This code includes the [ CodeMode = generator ] statement from the LogicalToDisplay method inherited from %IntegerOpens in a new tab. Because Duration provides code for this method, the [ CodeMode = generator ] statement needs to be removed. You can do this either by deleting the statement in Studio's main editing window or by changing the value of the CodeMode parameter to “code” in the Studio's Inspector window.

Once you perform this action, the now finished method should look like this:


ClassMethod LogicalToDisplay(%val As %Integer) As %String
[ ServerOnly = 0 ]
{
 Quit (%val \ 60) _ "h" _ (%val# 60) _ "m"
}

At this point, you should save and compile this new class using the Compile command within the Studio Build menu.

FeedbackOpens in a new tab