Changeset 105 for trunk/lingosource
- Timestamp:
- 12/16/07 22:41:38 (4 years ago)
- File:
-
- 1 edited
-
trunk/lingosource/castlib1/thisMoviesScript.ls (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/thisMoviesScript.ls
r63 r105 74 74 li = [] 75 75 mscr = [] 76 currMScripts = [] 77 76 78 pscr = [] 79 currPScripts = [] 80 77 81 bscr = [] 78 82 currBScripts = [] 79 83 80 84 li.add([#title: "Movie scripts", #items: mscr]) 81 85 li.add([#title: "Behavior scripts", #items: bscr]) 82 86 li.add([#title: "Parent scripts", #items: pscr]) 87 88 83 89 84 90 ---------------- menu divider for better readability: … … 113 119 mclnum = n 114 120 115 mscr.add([#title:"Castlib" && n &":", #items:[], #type:#divider]) 121 currMScripts = [] 122 -- mscr.add([#title:"Castlib" && n &":", #items:currMScripts, #type:#divider]) 123 mscr.add([#title:"Castlib" && n &":", #items:currMScripts, #name:"Castlib"&n]) 116 124 117 125 end if 118 126 ---------------- // menu divider 119 127 120 mscr.add(thisScriptList)128 currMScripts.add(thisScriptList) 121 129 #parent: 122 130 … … 124 132 if pclnum <> n then 125 133 pclnum = n 126 pscr.add([#title:"Castlib" && n &":", #items:[], #type:#divider]) 134 currPScripts = [] 135 -- pscr.add([#title:"Castlib" && n &":", #items:currPScripts, #type:#divider]) 136 pscr.add([#title:"Castlib" && n &":", #items:currPScripts, #name:"Castlib"&n]) 127 137 end if 128 138 ---------------- // menu divider 129 139 130 pscr.add(thisScriptList)140 currPScripts.add(thisScriptList) 131 141 #score: 132 142 … … 134 144 if bclnum <> n then 135 145 bclnum = n 136 bscr.add([#title:"Castlib" && n &":", #items:[], #type:#divider]) 146 currBScripts = [] 147 -- bscr.add([#title:"Castlib" && n &":", #items:currBScripts, #type:#divider]) 148 bscr.add([#title:"Castlib" && n &":", #items:currBScripts, #name:"Castlib"&n]) 137 149 end if 138 150 ---------------- // menu divider 139 151 140 bscr.add(thisScriptList)152 currBScripts.add(thisScriptList) 141 153 end case 142 154 … … 249 261 defaultItem = [#title: "", #items: [], #scripttype: memref.scripttype, #memName:dername, #memNum:memref.membernum, #clibNum:memref.castlibnum, #sel:[1,1]] 250 262 263 if len < 1 then 264 -- we cache only the results, if there is no search word 265 -- otherwise we would need to cache the result for every different searchword 266 pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 267 if ilk(pCachedResults) <> #proplist then 268 pCachedResults = [:] 269 xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 270 end if 271 cached = pCachedResults.getaprop(string(memref)) 272 if ilk(cached) = #proplist then 273 theDate = cached.getaprop(#theDate) 274 if theDate = memref.modifiedDate then 275 found = 1 276 thisScriptList.setaprop(#items, cached.getaprop(#items)) 277 else 278 pCachedResults.deleteprop(string(memref)) 279 end if 280 end if 281 end if 282 if found <> 1 then 251 283 found = mParseScriptText(scrtext, theItems, defaultItem, kw, searchmode, len) 252 284 if len < 1 then 285 pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 286 if ilk(pCachedResults) <> #proplist then 287 pCachedResults = [:] 288 xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 289 end if 290 pCachedResults.setaprop(string(memref), [#theDate:memref.modifiedDate, #items:duplicate(theItems)]) 291 end if 292 end if 253 293 end if 254 294
Note: See TracChangeset
for help on using the changeset viewer.
