news
About Elegant Chaos
info
About me and my friends
people
Software from Elegant Chaos
software
Other stuff...
stuff

DL_BkgndClick

Revision
Revised on

Description


Code

on DL_BkgndClick
  global DL_BkgndWindow,DL_BkgndList
  
  put the selLine of window DL_BkgndWindow into bnum
  put line bnum of the text of window DL_BkgndWindow into bname
  
  if the short name of bkgnd bnum is not bname then
    DL_RebuildBkgndList
    put the number of bkgnd bname into bnum
  end if
  
  put (the optionKey is down) into opt
  put (the commandKey is down) into cmd
  
  if opt then
    if cmd then
      edit script of bkgnd bnum
    else
      ask "New name?" with bname
      if it ­ empty then
        put it into line bnum of DL_BkgndList
        set the name of bkgnd bnum to it
        DL_UpdateBkgndWindow
      end if
    end if
  else
    go bkgnd bnum
  end if
  
end DL_BkgndClick