File:  [Coherent Logic Development] / freem / contrib / %N.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jan 19 02:04:04 2025 UTC (2 months, 1 week ago) by snw
Branches: MAIN, CoherentLogicDevelopment
CVS tags: v0-62-3, v0-62-2, v0-62-1, v0-62-0, start, HEAD
FreeM

%N	; A.Trocha ; choose Namespace [1999/02/01-22:11:25]
	; $Source: /home/cvsroot/freem/contrib/%N.m,v $
	; $Revision: 1.1.1.1 $ $Date: 2025/01/19 02:04:04 $
	N idx,cnt,tab,dflt
	;
	D ^%SYSDEV
	W @%CLR
	;
	D ^%MESS(1,"Choose a namespace to work with:")
	;
	;--- load namespaces into ^%UTILITY global
	K ^%UTILITY
	S idx="",cnt=0
	S dflt=$G(^%SYS("NSPACE"))
	F   S idx=$O(^%SYS("NSPACE",idx)) Q:idx=""  D
	. S ^%UTILITY($J,cnt)=^%SYS("NSPACE",idx)
	. s tab(cnt)=idx
	. I idx=dflt S $P(^%UTILITY($J),"'")=cnt
	. S cnt=cnt+1
	S $P(^%UTILITY($J),"'",2)="Namespaces"
	;
	;--- invoke Menu
	S erg=$$^%MEN(8)
	W !!
	I erg=-1 W !,"Canceled.",! Q
	;
	;--- switch UCI's
	S erg=tab(erg)
	S erg=$$switch^%SYSNSP(erg)
	I erg W !,"Done.",! D prompt^%SYS
	E  W !,"Failed.",!
	Q

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>