docs.intersystems.com
Caché Web Applications Tutorial
Saving the Data Type Class
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Search:    

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 %Integer. 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.


Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA