subr cube_list
 ;read a special file and load name field with choice
 if defined($clistwidget) eq 0 then {
 $clistwidget = xmdialog_board(0,0,0, 'some known cubes',0,0,10,10)
 wq = topbuttonsetupsanslink('$clist')
 fn='/hosts/shimmer/usr/people/shine/ana/tools/known_cubes'
 xmposition,xmlabel($clistwidget, 'file:' ,$f4), 150, 15
 $clisttext1 = xmtextfield(wq,'',280,'',$f3,'white')
 xmposition, $clisttext1, 170, 0, 280, 35
 bq = xmbutton(wq, 're-load', 'reload_cube_cb', $f4, 'darkgreen')
 xmposition, bq, 460, 0, 70, 30
 sq = 'select one of the following, no guarantees !'
 xmposition,xmlabel($clistwidget, sq ,$f4), 50, 50
 $clistfield = xmlistfromfile($clistwidget, 'clist_cb', fn, 10, $f3, 'white')
 if $clistfield eq -1 then {	;couldn't read the file
 errormess,'cube list file\nnot readable'
 fw = xmframe($clistwidget)
 $clistfield = xmtextbox(fw, 15, 80, $f3, 'white')
 xmtextappend, $clistfield, -
 	'The cube list file could not be found or was not readable.', 1
 xmtextappend, $clistfield, -
 	'Check the name and path, make corrections and try re-load', 1
 }
 xmposition, xtparent($clistfield), 0, 75
 }
 xmtextfieldsetstring, $clisttext1, fn
 xtmanage, $clistwidget
 return
 endsubr
 ;==========================================================
