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

DL_PartClick

Revision
Revised on

Description


Code

on DL_PartClick
  global DL_PartWindow,DL_PartList
  
  put the selLine of window DL_PartWindow into pnum
  put line pnum of the text of window DL_PartWindow into pname
  
  if the short name of part pnum is not pname then
    DL_UpdatePartList
    put the number of 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 part pnum
    else
      ask "New name?" with pname
      if it ­ empty then
        put it into line pnum of DL_PartList
        set the name of part pnum to it
        DL_UpdatePartWindow
      end if
    end if
  else
    select part pnum
  end if
  
end DL_PartClick