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

Changeset 99 for branches


Ignore:
Timestamp:
12/16/07 18:44:26 (4 years ago)
Author:
alex
Message:

cache handlerlist for members whcih were not modified, sort list of castlibs hierarchical by members

Location:
branches/beta
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/castlib1/keyboardNavigation_FrameLoop.ls

    r65 r99  
    22 
    33property pActive 
    4  
     4-- 
    55on exitFrame me 
    66   
  • branches/beta/castlib1/thisMoviesScript.ls

    r65 r99  
    7474  li = [] 
    7575  mscr = [] 
     76  currMScripts = [] 
     77   
    7678  pscr = [] 
     79  currPScripts = [] 
     80   
    7781  bscr = [] 
    78    
     82  currBScripts = [] 
    7983   
    8084  li.add([#title: "Movie scripts", #items: mscr]) 
    8185  li.add([#title: "Behavior scripts", #items: bscr]) 
    8286  li.add([#title: "Parent scripts", #items: pscr]) 
     87   
     88   
    8389   
    8490  ---------------- menu divider for better readability: 
     
    113119                  mclnum = n 
    114120                   
    115                   mscr.add([#title:"Castlib" && n &":", #items:[], #type:#divider]) 
     121                  currMScripts = [] 
     122                  mscr.add([#title:"Castlib" && n &":", #items:currMScripts, #type:#divider]) 
    116123                   
    117124                end if 
    118125                ---------------- // menu divider 
    119126                 
    120                 mscr.add(thisScriptList) 
     127                currMScripts.add(thisScriptList) 
    121128              #parent: 
    122129                 
     
    124131                if pclnum <> n then 
    125132                  pclnum = n 
    126                   pscr.add([#title:"Castlib" && n &":", #items:[], #type:#divider]) 
     133                  currPScripts = [] 
     134                  pscr.add([#title:"Castlib" && n &":", #items:currPScripts, #type:#divider]) 
    127135                end if 
    128136                ---------------- // menu divider 
    129137                 
    130                 pscr.add(thisScriptList) 
     138                currPScripts.add(thisScriptList) 
    131139              #score: 
    132140                 
     
    134142                if bclnum <> n then 
    135143                  bclnum = n 
    136                   bscr.add([#title:"Castlib" && n &":", #items:[], #type:#divider]) 
     144                  currBScripts = [] 
     145                  bscr.add([#title:"Castlib" && n &":", #items:currBScripts, #type:#divider]) 
    137146                end if 
    138147                ---------------- // menu divider 
    139148                 
    140                 bscr.add(thisScriptList) 
     149                currBScripts.add(thisScriptList) 
    141150            end case 
    142151             
     
    249258    defaultItem = [#title: "", #items: [], #scripttype: memref.scripttype, #memName:dername, #memNum:memref.membernum, #clibNum:memref.castlibnum, #sel:[1,1]] 
    250259     
    251     found = mParseScriptText(scrtext, theItems, defaultItem, kw, searchmode, len) 
    252      
     260    if len < 1 then 
     261      pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 
     262      if ilk(pCachedResults) <> #proplist then 
     263        pCachedResults = [:] 
     264        xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 
     265      end if 
     266      cached = pCachedResults.getaprop(string(memref)) 
     267      if ilk(cached) = #proplist then 
     268        theDate = cached.getaprop(#moddate) 
     269        if theDate = memref.modifiedDate then 
     270          found = 1 
     271          thisScriptList.setaprop(#items, cached.getaprop(#items)) 
     272        else 
     273          pCachedResults.deleteprop(string(memref)) 
     274        end if 
     275      end if 
     276    end if 
     277    if found <> 1 then 
     278      found = mParseScriptText(scrtext, theItems, defaultItem, kw, searchmode, len) 
     279      if len < 1 then 
     280        pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 
     281        if ilk(pCachedResults) <> #proplist then 
     282          pCachedResults = [:] 
     283          xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 
     284        end if 
     285        pCachedResults.setaprop(string(memref), [#theDate:memref.modifiedDate, #items:duplicate(theItems)]) 
     286      end if 
     287    end if 
    253288  end if 
    254289   
Note: See TracChangeset for help on using the changeset viewer.