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

Changeset 113 for trunk/lingosource


Ignore:
Timestamp:
01/16/08 10:29:35 (4 years ago)
Author:
alex
Message:

previous bugfix didn't work must defer this bug with a workaround now

Location:
trunk/lingosource/castlib1
Files:
3 edited

Legend:

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

    r110 r113  
    1111 
    1212---- This handler used to be in "thisMovieScript", but due to a scope bug with calling handlers in other movies -> tell the stage 
     13-- unfortunately this doesn't fix the problem. have to investiaget later WHY... so calling handlers, which are in this movie will fail 
    1314 
    1415 
    1516on mDoCmd dto, dto2 
     17   
     18  reservedHandlerList = [] 
     19  repeat with mscriptName in ["doCommandMovieScript", "thisMoviesScript", "convert_Lingo_2_CSS_Html"] 
     20    li = (script mscriptName).handlers() 
     21    if listP(li) then 
     22      repeat with n = count(li) down to 1 
     23        reservedHandlerList.add(string(li[n])) 
     24      end repeat 
     25    end if 
     26  end repeat 
    1627   
    1728  if ilk(dto) = #timeout then dto.forget() 
     
    118129  else 
    119130     
    120     if glob.getaprop(#cmd) = "mDoCmd" then 
    121       alert "Sorry due to a bug in director I can't call mDoCmd" 
     131    if reservedHandlerList.getPos(string(symbol(glob.getaprop(#cmd)))) > 0 then 
     132      alert "Sorry due to a bug in director I can't call handlers, which appear in moviescripts of this tool miaw themselves: " & glob.getaprop(#cmd) 
    122133      exit 
    123134    end if 
  • trunk/lingosource/castlib1/memberInfo.xml

    r110 r113  
    11<?xml version="1.0" encoding="ISO-8859-1" ?> 
    22<Untitled> 
     3        <doCommandMovieScript> 
     4                <scriptType>#movie</scriptType> 
     5                <comments></comments> 
     6                <memberName>doCommandMovieScript</memberName> 
     7                <fName>doCommandMovieScript</fName> 
     8        </doCommandMovieScript> 
    39        <thisMoviesScript> 
    410                <scriptType>#movie</scriptType> 
     
    127133                <fName>custom_Utilities</fName> 
    128134        </custom_Utilities> 
    129         <doCommandMovieScript> 
    130                 <scriptType>#movie</scriptType> 
    131                 <comments></comments> 
    132                 <memberName>doCommandMovieScript</memberName> 
    133                 <fName>doCommandMovieScript</fName> 
    134         </doCommandMovieScript> 
    135135</Untitled> 
  • trunk/lingosource/castlib1/thisMoviesScript.ls

    r110 r113  
    273273    if len < 1 then 
    274274       
    275       -- we cache only the results, if there is no search word 
    276       -- otherwise we would need to cache the result for every different searchword 
    277        
    278       --      pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 
    279       --      if ilk(pCachedResults) <> #proplist then 
    280       --        pCachedResults = [:] 
    281       --        xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 
    282       --      end if 
     275      ----------- unfortunately the modified date doesn't work at all so we can't cache by modified date 
     276      ----------- we cache instead by scripttext length, which will fail only if the bad chance happens, 
     277      ----------- that the modification is exactly the same length as the original 
    283278       
    284279      cached = pCachedResults.getaprop(string(memref)) 
    285280      if ilk(cached) = #proplist then 
    286281        theDate = cached.getaprop(#theDate) 
    287         if theDate = memref.modifiedDate then 
     282        -- if theDate = memref.modifiedDate then 
     283        if theDate = scrtext.length then 
    288284          found = 1 
    289285          thisScriptList.setaprop(#items, cached.getaprop(#items)) 
     
    296292      found = mParseScriptText(scrtext, theItems, defaultItem, kw, searchmode, len) 
    297293      if len < 1 then 
    298          
    299         --        pCachedResults = xscr().mGetGlobalValue(#pCachedResults) 
    300         --        if ilk(pCachedResults) <> #proplist then 
    301         --          pCachedResults = [:] 
    302         --        xscr().mSetGlobalValue(#pCachedResults, pCachedResults) 
    303         --      end if 
    304          
    305          
    306         pCachedResults.setaprop(string(memref), [#theDate:memref.modifiedDate, #items:duplicate(theItems)]) 
     294        -- pCachedResults.setaprop(string(memref), [#theDate:memref.modifiedDate, #items:duplicate(theItems)]) 
     295        pCachedResults.setaprop(string(memref), [#theDate:scrtext.length, #items:duplicate(theItems)]) 
    307296      end if 
    308297    end if 
Note: See TracChangeset for help on using the changeset viewer.