Changeset 1285 for EWD/ewdapps


Ignore:
Timestamp:
Nov 10, 2011, 10:15:01 AM (13 years ago)
Author:
Sam Habiel
Message:

updated ewdu with listEWDApps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EWD/ewdapps/so/r/ewdu.m

    r1284 r1285  
    1 ewdu ; JJIH/SMH - Utilities for EWD to VISTA interaction ; 11/4/11 10:44pm
     1ewdu ; JJIH/SMH - Utilities for EWD to VISTA interaction ; 11/10/11 3:27pm
    22 ;
    33r(sessid) ; Restore Symbol Table
     
    9292 n ret
    9393 d CVC^XUSRB(.ret,vcString)
    94  ;;test
    95  M ^ZZSAM=ret
    9694 i ret(0)=0 q ""  ; Success
    9795 i ret(0)>0 q ret(1)  ; Failure
    98 ;;
    99 ;;return(0)=0
    100 ;;return(1)=0
    101 ;;return(2)=1
    102 ;;return(3)="VERIFY CODE must be changed before continued use."
    103 ;;return(4)=0
    104 ;;return(5)=0
    105 ;;return(6)=""
    106 ;;return(7)="Good evening DOCTOR,TEN"
    107 ;;return(8)="     You last signed on today at 22:19"
     96 ;;
     97 ;;return(0)=0
     98 ;;return(1)=0
     99 ;;return(2)=1
     100 ;;return(3)="VERIFY CODE must be changed before continued use."
     101 ;;return(4)=0
     102 ;;return(5)=0
     103 ;;return(6)=""
     104 ;;return(7)="Good evening DOCTOR,TEN"
     105 ;;return(8)="     You last signed on today at 22:19"
     106listEWDApps(sessid)  ; Lists all available EWD Applicaitons, not including ewdMgr. Intended to be an imitation of a menu.
     107 n apps  ; Will hold our applications
     108 do
     109 . n ewdpath s ewdpath=^zewd("config","applicationRootPath")
     110 . o "lsApps":(shell="/bin/bash":command="ls -1 "_ewdpath:READONLY)::"PIPE"
     111 . u "lsApps"
     112 . n line
     113 . n counter s counter=1
     114 . for  read line quit:$zeof  do
     115 . . i line="ewdMgr" quit  ; Don't include ewdMgr
     116 . . s apps(counter)=line
     117 . . s counter=counter+1
     118 . c "lsApps"
     119 . zwrite:$g(debug) apps
     120 ;
     121 n appsjson s appsjson=$$arrayToJSON^%zewdJSON("apps")
     122 zwrite:$g(debug) appsjson
     123 d setSessionValue^%zewdAPI("appsjson",appsjson,sessid)
     124 q ""
Note: See TracChangeset for help on using the changeset viewer.