subr t3d_pathlist_cb
 ;make a list widget with all the weekly paths listed
 ;get the path with the last subdirectory
 path = t3d_get_base_path()
 sf = getdirects(path, 2000)
 if isstrarr(sf) eq 0 then {
  ;try again (network hangup?) and then complain
  sf = getdirects(path, 2000)
  if isstrarr(sf) eq 0 then {
   errormess,'could not read\n'+path+'\nnetwork problem\nor path error?\n'
   return }}
 ;if this is the secondary, take out directories not named week... and
 ;those without any files
 if $primary eq 0 then {
  nf = num_elem(sf)
  for i=0,nf-1 do {
   if strpos(sf(i),'week') eq 0 then {
   sq = path + '/' + sf(i)
   sq = getfiles(sq,1000)
   if isstrarr(sq) eq 0  then sf(i) = ''
   } else sf(i) = ''
  }
 }
 sf = sort(sf)
 nf = num_elem(sf)
 if (nf le 0) { errormess,'no files found in path\n'+path  return }
 if defined($t3pathlistwidget) ne 1 then {
  $t3pathlistwidget = xmtoplevel_form(0,0, 'TRACE paths for '+path,0,0,5, 5)
  wq = topbuttonsetupsanslink_tl('$t3pathlist')

  sq = 't3d_pathlist_entry_cb'
  list = xmlist($t3pathlistwidget, sq, 10, $f8, 'white', 1)
  xmposition, xtparent(list), 0, 0, 150, 100
  sep = xmseparator($t3pathlistwidget, 0, 10, 0)
  xmposition, sep, 0, 0, 10, 10
  formvstack, wq, sep, xtparent(list)
  xmattach, xtparent(list), 0, 1,1,0,1
  xtpopup, $t3pathlistwidget
  scanpositions, $t3pathlistwidget, 't3pathlistwidget', $bx_ix, $by_iy
  ty,'$t3pathlistwidget to ', $bx_ix, $by_iy
  xmposition, $t3pathlistwidget, $bx_ix, $by_iy + $magic_mac_yoffset
  xtloop, 2
  $t3pathlistwidget = list	;use for global
  add_to_hideables, $t3pathlistwidget
 }
 ;delete the old stuff (if any)
 xmlistdeleteall, list
 ;loop over all files and put in list, if string isn't NULL
 xtpopdown, $t3pathlistwidget
 for i= 0, nf-1 do {
 if num_elem(sf(i)) gt 0 then xmlistadditem, list, sf(i)
 }
 ;;base_path = path	;added 7/6/98
 xtpopup, $t3pathlistwidget
 ;position to bottom and select last entry if primary source
 if $primary then { 
   xmlistselect,$t3pathlistwidget,nf,1
   xmlistselect,$t3pathlistwidget,(nf-5)>1,0
   }
 endsubr
 ;======================================================= 
