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

DL_SetFlag

Revision
Revised on

Description


Code

on DL_SetFlag flag,stackName,enabled
  put the script of stack stackName into stackScript
  put DL_GetScriptField("Flags",stackScript) into flags
  if enabled then
    if flag is not in flags then
      put comma & flag after flags
    end if
    
  else if flag is in flags then
    repeat with n = 1 to the number of items in flags
      if item n of flags contains flag then
        delete item n of flags
        exit repeat
      end if
    end repeat
  end if
  
  put DL_SetScriptField("Flags",stackScript,flags) into stackScript
  set the script of stack stackName to stackScript
  
end DL_SetFlag