Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Ignore:
Timestamp:
03/21/10 11:39:48 (2 years ago)
Author:
alex
Message:

cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib1/alexUtilities.ls

    r244 r245  
    3838property pCaseLists 
    3939 
     40property pCachedFiles 
     41 
    4042 
    4143on new me 
     44  pCachedFiles = [:] 
    4245  ancestor = new(script "PseudoXMLPS") -- we need this script later 
    4346  -- and as we may already be in the scope of the stage, we use it as ancestor 
     
    124127  ----------------------------------- 
    125128   
     129  theResult = pCachedFiles.getaprop(pfad) 
     130  if listP(theResult) then return theResult 
     131   
    126132  theResult = [:] 
    127133  dertext = mGetTextFromFile(me, pfad) 
    128134  if length(dertext) > 0 then 
    129135    statusSwitched = mSwitchToStatusMode(me, 1) 
    130     theResult = mGetListFromXMLString(me, dertext) 
     136    theResult = mGetListFromXMLStringX(me, dertext) 
     137    pCachedFiles.setaProp(pfad, theResult) 
    131138    if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 
    132139  end if 
    133140  return theResult 
     141end 
     142 
     143-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     144 
     145on mClearXML_Cache me, string_fullPath 
     146  ----------------------------------- 
     147  --         ACTION: We have a cache for xml files, sio that we do not need to parse the same 
     148  --                 file over and over again, as itis time consuming esp. during repeat loops 
     149  --                 so we store the result in pCachedFiles by filename. 
     150  --                 In order to flush this cache for either one file (with parameter) or all files 
     151  --                 (without parameter) use this handler 
     152  --  
     153  --         INPUT: <string_fullPath> ; string ; full pathname ; optional => default "" => clear all cahced files 
     154  --         RETURNS: - 
     155  ----------------------------------- 
     156   
     157  string_fullPath = string(string_fullPath) 
     158  if length(string_fullPath) > 0 then 
     159    pCachedFiles.deleteProp(string_fullPath) 
     160  else 
     161    pCachedFiles = [:] 
     162  end if 
    134163end 
    135164 
     
    149178    if not(list(theList)) then theList = [:] 
    150179  end if 
     180  pCachedFiles.setaProp(thePath, theList) 
    151181  theResult = mGetXMLStringFromList(me, theList) 
    152182  return mSaveToTextFile(me, theResult, thePath) 
     
    29272957end 
    29282958 
    2929  
    2930 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    2931  
    2932 on mGetWindowsHomeFolder me 
    2933    
    2934   if mCheckForXtra(me, "Shell") = 0 then 
    2935     home = mDoShellCmd(me, "echo %HOMEPATH%", void, void, 1) 
    2936     home = home[1] 
    2937   else if mCheckForXtra(me, "BudAPI") then 
    2938     olddelim = the itemdelimiter 
    2939     the itemdelimiter = "\" 
    2940     home = baSysFolder("personal") 
    2941     if the last char of home = "\" then delete the last char of home 
    2942     if the last item of home = "Documents" then delete the last item of home 
    2943     the itemdelimiter = olddelim 
    2944   else 
    2945     home = "" 
    2946   end if 
    2947    
    2948   return home 
    2949 end 
    2950  
    29512959-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    29522960on _______________GLOSSARY_ITEMS me 
     
    35323540  end if 
    35333541   
    3534   -- pUPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZZÁÀ"&vA& "ÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙ€ÜÆØŒŸ" 
    3535   -- pLowercase = "abcdefghijklmnopqrstuvwxyzáà"&"â"&"äãåçéèêëíìîïñóòôöõúùûüæøœÿ" 
    3536   pCaseLists.setaprop(#uppercase, ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "Á", "À", vA, "A", "Ä", "Ã", "Å", "Ç", "É", "È", "Ê", "Ë", "Í", "Ì", "Î", "Ï", "Ñ", "Ó", "Ò", "Ô", "Ö", "Õ", "Ú", "Ù", "U", "Ü", "Æ", "Ø", "Œ", "Ÿ"]) 
    3537   pCaseLists.setaprop(#lowercase, ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "á", "à", vA, "â", "ä", "ã", "å", "ç", "é", "è", "ê", "ë", "í", "ì", "î", "ï", "ñ", "ó", "ò", "ô", "ö", "õ", "ú", "ù", "û", "ü", "æ", "ø", "œ", "ÿ"]) 
     3542  -- pUPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZZçË"&vA& "€Ì‚ƒéæèêíëì„îñï 
     3543Íòôۆ®¯ÎÙ" 
     3544  -- pLowercase = "abcdefghijklmnopqrstuvwxyz‡ˆ"&"‰"&"Š‹ŒŽ‘’“”•–—˜™š›œžŸŸ¿ÏØ" 
     3545  pCaseLists.setaprop(#uppercase, ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "ç", "Ë", vA, "A", "€", "Ì", "", "‚", "ƒ", "é", "æ", "è", "ê", "í", "ë", "ì", "„", "î", "ñ", "ï", " 
     3546", "Í", "ò", "ô", "U", "†", "®", "¯", "Î", "Ù"]) 
     3547  pCaseLists.setaprop(#lowercase, ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "‡", "ˆ", vA, "‰", "Š", "‹", "Œ", "", "Ž", "", "", "‘", "’", "“", "”", "•", "–", "—", "˜", "™", "š", "›", "œ", "", "ž", "Ÿ", "Ÿ", "¿", "Ï", "Ø"]) 
    35383548   
    35393549end 
Note: See TracChangeset for help on using the changeset viewer.