Hi Alex, Oleg, Ric, Bill, Brian, Don and I collaborated on this script 3 years ago. If it is of use to you feel free to use it. It runs on J602 and uses radio buttons to select the viewing style on a wd form. It was never picked up since it is generally quicker to just change the display as you work with the interpreter. In an educational environment it may prove to be more useful, feel free to use it if you like.
The actual correspondence on the development date back to this thread in the programming forum. http://jsoftware.com/pipermail/programming/2009-April/014508.html Cheers, bob coerase<'rgtVisual' NB. debug - clear traces of globals coclass 'rgtVisual' NB. --------------------------------------------------------- NB. This script creates a form that takes tacit sentences NB. entered by the user in a text box and displays the NB. selected format in a listbox. NB. --------------------------------------------------------- DISPLAY=: 0 : 0 pc display dialog;pn "Tacit Display"; xywh 9 156 216 22;cc box edit topmove rightmove bottommove; xywh 248 24 60 11;cc cbFormatBox checkbox leftmove rightmove;cn "Box Format"; xywh 248 40 60 11;cc cbFormatTree checkbox leftmove rightmove group;cn "Tree Format"; xywh 248 56 60 11;cc cbFormatLinear checkbox leftmove rightmove group;cn "Linear Format"; xywh 248 72 60 11;cc cbFormatParens checkbox leftmove rightmove group;cn "Parens Format"; xywh 240 12 95 80;cc format groupbox leftmove rightmove;cn "Display Style"; xywh 0 0 225 150;cc tdisp editm ws_hscroll ws_vscroll es_readonly rightmove bottommove; xywh 248 114 60 11;cc rbDAscii radiobutton leftmove rightmove;cn "Ascii"; xywh 248 131 60 11;cc rbDLine radiobutton leftmove rightmove group;cn "Line"; xywh 240 103 95 47;cc gbDrawStyle groupbox leftmove rightmove;cn "Drawing Style"; pas 6 6;pcenter; rem form end; ) CBFORMAT=: 'cbFormat'&,each ;:'Box Tree Linear Parens' RBD=: 'rbD'&,each ;:'Ascii Line' LINEDRAW =: (16+i.11) { a. ASCIIDRAW=: '+++++++++|-' rbDstate =: 3 : '>((9!:6 '''') -: ASCIIDRAW){;:''rbDLine rbDAscii''' display_run=: 3 : 0 wd DISPLAY wd 'set box *',y wd 'setfont box ',FIXFONT,'; setfocus box;' wd 'setfont tdisp ',FIXFONT,'; setenable tdisp 1;' wd 'set ',(0{::CBFORMAT),' 1;' wd 'set ',(rbDstate ''),' 1;' box=: y update '' wd 'pshow;' ) display_resume=: 3 : 0 wd 'psel display' wd 'set ',(rbDstate ''),' 1;' wd 'set box *',box=: y update'' ) display_close=: 3 : 0 wd'pclose' ) styles=: (4 : 0)"0 _ ".'zzz=. ' , y res=. 5!: x <'zzz' <LF,~ , ,&LF @ ucpboxdraw_jijs_"1 ": res ) stD=: 3 : 0 UDRAW=: 9!:6 '' 9!:7 (". >({.RBD) wdget wd 'qd'){ LINEDRAW ,: ASCIIDRAW y ) rstD=: 3 : '9!:7 UDRAW' drw=: stD :. rstD update=: 3 : 0 try. (3 : 'wd ''set tdisp *'', utf8 ; (2 4 5 6#~ 99".> CBFORMAT wdget wd ''qd'') styles y') &. drw box catch. wd 'set tdisp *',13!:12 '' rstD '' end. ) display_box_button=: update ('display_'&,each RBD,each<'_button')=: update ('display_'&,each CBFORMAT,each<'_button')=: update display=: display_run`display_resume @.((<'display') e. {."1 @wdforms) display_z_=: display_rgtVisual_ display_cancel=: display_close display '+/ % #' On 2012-12-01, at 10:02 PM, Alex Giannakopoulos wrote: > Would be amazing, and really useful for educational purposes too, if we > could change between modes on the fly. > > On 2 December 2012 06:00, Alex Giannakopoulos <aeg...@blueyonder.co.uk>wrote: > >> Thanks Ric, >> >> I'd been looking all over the config files, but somehow I missed it. >> The Tree view is great too (was it really there in 602??) >> >> A fantastic feature, this too should have pride of place in any J intro >> blurb. Man, 701 seriously undersells itself! >> >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm