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

DL_CardClick

Revision
Revised on

Description


Code

on DL_CardClick
  global DL_CardWindow, DL_CardList
  
  put the selLine of window DL_CardWindow into cnum
  put line cnum of the text of window DL_CardWindow into cname
  
  if the short name of card cnum is not cname then
    DL_RebuildCardList
    put the number of card cname into cnum
  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 card cnum
    else
      ask "New name?" with cname
      if it ­ empty then
        put it into line cnum of DL_CardList
        set the name of card cnum to it
        DL_UpdateCardWindow
      end if
    end if
  else
    go card cnum
  end if
  
end DL_CardClick