Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XUINEND1

XUINEND1.m

Go to the documentation of this file.
XUINEND1 ;SF-ISC/STAFF - POSTINIT FOR KERNEL V7 ;4/15/93  12:33
 ;;7.1;KERNEL;;May 11, 1993
 W !,"Don't call from top." Q
A5 ;Now to change your XUCOMMAND option. Please review."
 G A5X:($$LKOPT("XUCOMMAND")'>0)
 F XU1="XUUSERDISP","XUSEREDITSELF","XUUSERHELP","XU-SPL-MENU" S X=$$ITEMDEL("XUCOMMAND",XU1)
 F XU1=1:1:3 S X=$$ADD("XUCOMMAND",$P("XUSERTOOLS^XQALERT^XUSERWHERE",U,XU1),$P("TBOX^VA^",U,XU1))
A5X ;Exit tag for A5
 ;
 Q
 ;
ADD(MENU,OPT,SYN,ORD) ;EF. Add options to a menu
 Q:$G(MENU)']"" 0 Q:$G(OPT)']"" 0 S SYN=$G(SYN),ORD=$G(ORD)
 N X,XPD1,XPD2,XPD3,DIC,DA,D0,DR,DLAYGO S DLAYGO=19
 S XPD1=$$LKOPT(MENU) Q:XPD1'>0 0 I $$TYPE(XPD1)'["M" Q 0
 S DIC="^DIC(19,"_XPD1_",10,"
 S XPD2=$$LKOPT(OPT) Q:XPD2'>0 0
 I '$D(^DIC(19,XPD1,10,"B",XPD2)) S X=XPD2,(D0,DA(1))=XPD1,DIC(0)="MLF",DIC("P")=$P(^DD(19,10,0),"^",2) D FILE^DICN
 S XPD3=$O(^DIC(19,XPD1,10,"B",XPD2,0))
 I XPD3>0 S DR="" S:SYN]"" DR="2///"_SYN_";" S:ORD]"" DR=DR_"3///"_ORD I DR]"" S DIE=DIC,DA=XPD3,DA(1)=XPD1 D ^DIE
 Q XPD3>0
LKOPT(X) ;EF.  To lookup on "B"
 Q $O(^DIC(19,"B",X,0))
TYPE(X) ;EF. Return option type, Pass IFN.
 Q:X'>0 "" Q $P($G(^DIC(19,X,0)),"^",4)
ITEMDEL(MENU,OPT) ;EF. Delete item from menu.
 N XPD1,XPD2,DIK,DA,X
 Q:MENU']"" 0 Q:OPT']"" 0
 S XPD1=$$LKOPT(MENU) Q:XPD1'>0 0 I $$TYPE(XPD1)'="M" Q 0
 S XPD2=$$LKOPT(OPT) Q:XPD2'>0 0
 S DA=$O(^DIC(19,XPD1,10,"B",XPD2,0)) Q:DA'>0 0
 S DA(1)=XPD1,DIK="^DIC(19,XPD1,10," D ^DIK
 Q 1