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

DL_BkgndPartClick

Revision
Revised on

Description


Code

on DL_BkgndPartClick
  global DL_BkgndPartWindow,DL_BkgndPartList
  
  put the selLine of window DL_BkgndPartWindow into pnum
  put line pnum of the text of window DL_BkgndPartWindow into pname
  
  if the short name of bkgnd part pnum is not pname then
    DL_UpdateBkgndPartList
    put the number of bkgnd part pname into pnum
  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 part pnum
    else
      ask "New name?" with pname
      if it ­ empty then
        put it into line pnum of DL_BkgndPartList
        set the name of bkgnd part pnum to it
        DL_UpdateBkgndPartWindow
      end if
    end if
  else
    select bkgnd part pnum
  end if
  
end DL_BkgndPartClick