Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

データ型クラスの保存

この時点で、メソッドは以下のようになっています。


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

このコードには、%IntegerOpens in a new tab から継承された LogicalToDisplay メソッドからの [ CodeMode = generator ] 文が含まれます。このメソッドでは Duration でこのコードが提供されるので、[ CodeMode = generator ] 文を削除する必要があります。これには、スタジオの編集ウィンドウで文を削除するか、スタジオの [インスペクタ] ウィンドウの CodeMode パラメータの値を “code” に変更します。

この作業を実行すると、メソッドは以下のようになります。


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

ここで、スタジオの [ビルド] メニューの [コンパイル] コマンドを使用して、この新規のクラスを保存してコンパイルします。

FeedbackOpens in a new tab