:Class Props ⍝ Implement "ListProp" as "Spice Command". From Ray Cannons UCMDS. ⎕ml←0 ⋄ ⎕io←1 ∇ r←List :Access Shared Public r←⎕NS'' r.Name←'GUIProps' r.Desc←'List property names and values of "current object"' r.Parse←'' r.Group←'Tools' ∇ ∇ r←Run(Cmd Args);CL;A;B;SU;Ob :Access Shared Public ⍝ Perform a PropList on current GUI object SU←⎕SE.Dyalog.Utils :If Args∧.=' ' ⍝ Try to pick it up from CurObj Args←'⎕SE.cbbot.bandsb2.sb.curobj'⎕WG'Text' Args←(¯1+Args⍳'(')↑Args :EndIf Args←Args~' ' :If Args≡'' r←'(No object identified)' :Else Ob←('⎕SE'⎕WG'CurSpace'),'.',Args :If 9≠⎕NC Ob :OrIf 0=(⍎Ob).⎕NC⊂'PropList' r←'Not a GUI object: ',Ob :Else A←SU.showCol↑0 Listprop Ob B←SU.showCol↑1 Listprop Ob r←A{↑(↓⍺),↓⍵}B :EndIf :EndIf ∇ ∇ r←lev Help Cmd :Access Shared Public r←'Lists properties and their values for the object reported as the current object.' →lev↓0 r←↑r'','Example: find the properties of defined form F:' ' ]guiprops F' ∇ ∇ r←arg Listprop guiobj;prop;row;w;split;len;res split←{⍺{⍵<⍺-20:⍺ ⋄ ⍵}⍺-+/∧\' '≠⌽⍺↑⍵} w←⎕PW-5 r←,⊂'Properties of ',guiobj :With guiobj ⋄ ⎕WX←3 :For prop :In PropList(~{⍵⍵=0:⍺ ⍺⍺ ⍵ ⋄ ⍵}arg)'MethodList' 'ChildList' 'EventList' 'PropList' res←{0::'?' ⋄ ,⍕⍎⍵}prop row←prop,':',res :If w<⍴row r,←⊂'' :While w<⍴row len←w split row r,←⊂len↑row row←len↓row :End :End r,←⊂row :End :End ∇ :EndClass