subr sb_obsfilelist_entry_cb
 ;action when choosing an observable subdirectory
 $sbobspath = $list_item
 path = $sbdatepath + $sbobspath
 $sbscidir = getdirects(path)
 if isscalar($sbscidir) then { errormess,'no files found in path\n'+path  return }
 $sbscidir = sort($sbscidir)
 nf = num_elem($sbscidir)
 ;create widget if it doesn't exist yet
 if defined($sbscifilelistwidget) ne 1 then {
    compile_file, getenv('ANA_WLIB') + '/solarbscilistwidgettool.ana'
 }
 ;loop over all files and put in list
 xtpopdown, $sbscifilelistwidget
 ;delete the old stuff (if any)
 xmlistdeleteall, $sbscifilelist
 for i= 0, nf-1 do {
 xmlistadditem, $sbscifilelist, $sbscidir(i)
 }
 xtpopup, $sbscifilelistwidget
 endsubr
 ;========================================================
