Changeset 108 for trunk/lingosource
- Timestamp:
- 01/16/08 09:03:56 (4 years ago)
- File:
-
- 1 edited
-
trunk/lingosource/castlib1/thisMoviesScript.ls (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/thisMoviesScript.ls
r105 r108 101 101 savelist = [:] 102 102 103 104 -- list to cache results for every different searchword 105 pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 106 if ilk(pCachedResults) <> #proplist then 107 pCachedResults = [:] 108 xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 109 end if 110 111 112 103 113 tell the stage 104 114 … … 108 118 if memref.type = #script then 109 119 110 thisScriptList = mGetScriptHandlerList(memref, kw, searchmode, len )120 thisScriptList = mGetScriptHandlerList(memref, kw, searchmode, len, pCachedResults) 111 121 112 122 if count(thisScriptList) > 0 then … … 248 258 -- get a list of all handlers which pass through the filter if any, in the format we need for the menu 249 259 250 on mGetScriptHandlerList memref, kw, searchmode, len 260 on mGetScriptHandlerList memref, kw, searchmode, len, pCachedResults 251 261 252 262 scrtext = string(memref.scripttext) … … 262 272 263 273 if len < 1 then 274 264 275 -- we cache only the results, if there is no search word 265 276 -- 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 277 278 -- pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 279 -- if ilk(pCachedResults) <> #proplist then 280 -- pCachedResults = [:] 281 -- xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 282 -- end if 283 271 284 cached = pCachedResults.getaprop(string(memref)) 272 285 if ilk(cached) = #proplist then … … 281 294 end if 282 295 if found <> 1 then 283 found = mParseScriptText(scrtext, theItems, defaultItem, kw, searchmode, len)296 found = mParseScriptText(scrtext, theItems, defaultItem, kw, searchmode, len) 284 297 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 298 299 -- pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 300 -- if ilk(pCachedResults) <> #proplist then 301 -- pCachedResults = [:] 302 -- xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 303 -- end if 304 305 290 306 pCachedResults.setaprop(string(memref), [#theDate:memref.modifiedDate, #items:duplicate(theItems)]) 291 307 end if
Note: See TracChangeset
for help on using the changeset viewer.
