Created
October 2, 2014 18:52
-
-
Save mhulse/6f8e26da8c2cc3e69f31 to your computer and use it in GitHub Desktop.
Caché 2009.1 - NEWSCYCLE Solutions: DTI Lighting 7.7.x: Argumentless zwrite, useful when developing code for debug purposes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="cache" runat="server"> | |
//-------------------------------------------------------------------------- | |
// | |
// Debug: | |
// | |
//-------------------------------------------------------------------------- | |
write !, "<pre>" | |
try { | |
set currIO = ##class(%SYS.NLS.Device).SetIO("HTML") | |
zwrite | |
} | |
catch { | |
write "ERROR: ", $ZERROR | |
} | |
if $get(currIO) '= "" { | |
do ##class(%SYS.NLS.Device).SetIO(currIO) | |
} | |
write "</pre>" | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code uses an argumentless zwrite:
Put above code at bottom of test page to see it in action.
Shameless plug: Here's some test code (tag/RULE) I wrote to super-charge the use of zwrite on the template level. Unfortunately, after I got done developing this code, I found that DTI template system stopped it from working due to how the template system uses includes under the hood. Oh well.