- Timestamp:
- Dec 4, 2011, 12:15:30 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EWD/ewdapps/so/r/ewdu.m
r1285 r1305 1 ewdu ; JJIH/SMH - Utilities for EWD to VISTA interaction ; 11/1 0/11 3:27pm1 ewdu ; JJIH/SMH - Utilities for EWD to VISTA interaction ; 11/18/11 5:39pm 2 2 ; 3 3 r(sessid) ; Restore Symbol Table … … 118 118 . c "lsApps" 119 119 . zwrite:$g(debug) apps 120 . d mergeArrayToSession^%zewdAPI(.apps,"installedapps",sessid) 120 121 ; 121 n appsjson s appsjson=$$arrayToJSON^%zewdJSON("apps") 122 zwrite:$g(debug) appsjson 123 d setSessionValue^%zewdAPI("appsjson",appsjson,sessid) 122 ; Old code: uses JSON 123 ; n appsjson s appsjson=$$arrayToJSON^%zewdJSON("apps") 124 ; zwrite:$g(debug) appsjson 125 ; d setSessionValue^%zewdAPI("appsjson",appsjson,sessid) 126 ; 124 127 q "" 128 redir(sessid) 129 n redirapp s redirapp=$$getRequestValue^%zewdAPI("nextapp",sessid) 130 d setRedirect^%zewdAPI("index",sessid,redirapp) 131 q "" 132 ; 133 INQ(sessid) ; DIINQUIRE Application Pre-Page Script 134 n outopt ; Output Options checkbox values 135 d getCheckboxValues^%zewdAPI("outopt",.outopt,sessid) 136 n capopts s capopts="" ; Caption Options to get from checkbox values 137 n i s i="" 138 for set i=$order(outopt(i)) q:i="" s capopts=capopts_i 139 S IOP="HFS" D ^%ZIS ; Open HFS Device 140 U IO ; USE HFS Device 141 D CAPTION^DIQ(200,9,capopts) ; Write Out Report 142 D ^%ZISC ; Close Device 143 ; 144 ; This code doesn't work, and my debugger couldn't go through it. 145 ; something is wrong--and I have an old version of GT.M--why is this happening? 146 ; N PATH S PATH=$$PATH^MXMLPRSE(IO("CLOSE")) 147 ; N FILE S FILE=$P(IO("CLOSE"),PATH,2) 148 ; N RESULT S RESULT=$$FTG^%ZISH(PATH,FILE,$NAME(^TMP("EWDU",$J)),3) ; Doesn't work!!! 149 ; 150 ; ------------------> Read the File Back 151 OPEN IO("CLOSE"):(READONLY:rewind) ; Open Again for reading 152 USE IO("CLOSE") ; Use 153 N CNT S CNT=1 ; Counter 154 KILL ^TMP("EWDU",$J) ; Kill TMP Global 155 FOR DO Q:$ZEOF ; Read the file 156 . N % R % 157 . S ^TMP("EWDU",$J,CNT)=% 158 . S CNT=CNT+1 159 C IO("CLOSE"):(delete) ; Close and delete 160 ; <------------------ Close the File 161 ; 162 ; Move to EWD Session 163 d clearSessionArray^%zewdAPI("DIINQUIRE",sessid) 164 d mergeGlobalToSession^%zewdAPI($NAME(^TMP("EWDU",$J)),"DIINQUIRE",sessid) 165 QUIT ""
Note:
See TracChangeset
for help on using the changeset viewer.