Class compile generating error after adding DrawYesNo functionality

52 views
Skip to first unread message

DJSaunders

unread,
Mar 7, 2018, 3:45:45 PM3/7/18
to InterSystems: Zen Community
I searched but did not see another post about this, so sorry if this is a duplicate.

I am using Cache 2013.1.1 (Build 501 + Adhoc 14230) 25-JUL-2014 17:18:08.43 on OpenVMS/IA64 V8.4 (Itanium).

So after I added the DrawYesNo functionality taken straight out of the documentation: /csp/docbook/DocBook.UI.Page.cls?KEY=GZCP_tables#GZCP_table_columns

I get this error:
ERROR: Compiling method/s: DrawYesNo
ERROR: UT.Zen.InterfaceLister.1(5) : MPP5646 : ##expression on '<ZDOMN>macroText+17^%occMessages' failed with an error: %2
 TEXT: Write ##safeexpression($$macroText^%occMessages($lb("""Yes""")))
ERROR: UT.Zen.InterfaceLister.1(7) : MPP5646 : ##expression on '<ZDOMN>macroText+17^%occMessages' failed with an error: %2
 TEXT: Write ##safeexpression($$macroText^%occMessages($lb("""No""")))

Here is my code:
  <column colName="ReferralPSCDexist" header="PSCD?" OnDrawCell="DrawYesNo"/>
ClassMethod DrawYesNo(pTable As %ZEN.Component.tablePane, pName As %String, pSeed As %String) As %Status
{
// If data = 1 set to Yes, Else set to No
If (%query(pName)) {
Write $$$Text("Yes")
Else {
Write $$$Text("No")
}
Quit $$$OK
}

Any idea what the issue maybe? Why would something straight out of the documentation not work or generate compile errors?



DJSaunders

unread,
Mar 7, 2018, 5:09:32 PM3/7/18
to InterSystems: Zen Community
I had to replace Write $$$Text() with &html<>.

DJSaunders

unread,
Mar 7, 2018, 5:12:07 PM3/7/18
to InterSystems: Zen Community
However it is not obeying the style to center the text in the cell.

  <column colName="ReferralPSCDexist" header="PSCD?" OnDrawCell="DrawYesNo" style="text-align:center"/>



On Wednesday, March 7, 2018 at 2:45:45 PM UTC-6, DJSaunders wrote:

DJSaunders

unread,
Mar 7, 2018, 5:15:13 PM3/7/18
to InterSystems: Zen Community
Ooops. Missing semi-colon at end. Once I added that it worked.


On Wednesday, March 7, 2018 at 2:45:45 PM UTC-6, DJSaunders wrote:
Reply all
Reply to author
Forward
0 new messages