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

Changeset 188


Ignore:
Timestamp:
09/30/08 13:47:30 (4 years ago)
Author:
alex
Message:

testing the cancel function

Location:
trunk/lingosource/castlib1
Files:
4 edited

Legend:

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

    r180 r188  
    341341   
    342342  subli.add("SVN Update selected castlib...") 
    343   pLookUpCommandList.setaprop("SVN Update selected castlib...", ["mSVN_Update_SelectedCastlib me, chooseNewPath_optional, onlyUpdate_SVN_WorkingFolder_optional", "svn_Utilities"]) 
     343  pLookUpCommandList.setaprop("SVN Update selected castlib...", ["mSVN_Update_SelectedCastlib me, chooseNewPath_optional, onlyUpdate_SVN_WorkingFolder_optional, selectionList_optional", "svn_Utilities"]) 
    344344   
    345345  subli.add("SVN Update Current Movie...") 
  • trunk/lingosource/castlib1/doCommandMovieScript.ls

    r116 r188  
    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 
     13-- unfortunately this doesn't fix the problem. I have to investigate later WHY... so calling handlers, which are in this movie will fail 
    1414 
    1515 
  • trunk/lingosource/castlib1/subversion_version_field.txt

    r186 r188  
    1 r188 
     1r190 
  • trunk/lingosource/castlib1/svn_Utilities.ls

    r180 r188  
    19051905   
    19061906  if count(castlibList) < 1 then 
    1907     alert "No castlib selected. The parameter didn't yiled a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 
     1907    alert "No castlib selected. The parameter didn't yield a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 
    19081908    return 0 
    19091909  end if 
     
    24532453-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    24542454 
    2455 on mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, dontShowAlert 
     2455on mSVN_Update_SelectedCastlib me, chooseNewPath, onlyUpdate_SVN_WorkingFolder, selectionList, dontShowAlert 
    24562456   
    24572457  actCL = the activecastlib 
     2458  castlibList = [actCL] 
     2459   
     2460  selectionList = string(selectionList) 
     2461  if length(selectionList) > 0 then 
     2462     
     2463    if char 1 of selectionList <> "[" then put "[" before selectionList 
     2464    if the last char of selectionList <> "]" then put "]" after selectionList 
     2465     
     2466    selectionList = value(selectionList) 
     2467    if listP(selectionList) then 
     2468      clnum = the number of castlibs + 1 
     2469      castlibList = [] 
     2470      selectionListCnt = count(selectionList) 
     2471      repeat with n = 1 to selectionListCnt 
     2472        int = integer(selectionList[n]) 
     2473        if integerP(int) then 
     2474          if clnum > int then 
     2475            if castlibList.getPos(int) < 1 then castlibList.add(int) 
     2476          end if 
     2477        end if 
     2478      end repeat 
     2479    end if 
     2480  end if 
     2481   
     2482  if count(castlibList) < 1 then 
     2483    alert "No castlib selected. The parameter didn't yield a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 
     2484    return 0 
     2485  end if 
     2486  put "Updating castlibs:" && castlibList 
     2487   
    24582488   
    24592489  workingCopies = value(getPref("svn_wCopies_paths_Binary.txt")) 
     
    24722502   
    24732503   
    2474   fname = castlib(actCL).filename 
     2504  isMac = (the platform contains "mac") 
     2505  castlibPathList = [] 
    24752506   
    24762507  --------------------------------------- 
     
    24822513    the itemdelimiter = mp 
    24832514     
    2484     if length(fname) > 0 then 
    2485        
    2486       offs = offset(mp, fname) 
    2487       if offs <> 1 then 
    2488         alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 
     2515     
     2516    repeat with actCL in castlibList 
     2517      fname = castlib(actCL).filename 
     2518      if length(fname) > 0 then 
     2519         
     2520        offs = offset(mp, fname) 
     2521        if offs <> 1 then 
     2522          alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 
     2523          return 0 
     2524        end if 
     2525         
     2526        relpath = fname 
     2527        delete char 1 to mplen of relpath 
     2528         
     2529        newpath = workingFolder & relpath 
     2530        --        newpathDir = newpath 
     2531        --        delete the last item of newpathDir 
     2532         
     2533        -- if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 
     2534        -- baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 
     2535         
     2536        if isMac then 
     2537          castlibPathList.add([#newpath:newpath, #newpathUnix: baUnixName(newpath), #fname:fname]) 
     2538        else 
     2539          castlibPathList.add([#newpath:newpath, #newpathUnix: newpath, #fname:fname]) 
     2540        end if 
     2541         
     2542      else 
     2543         
     2544        -- musty something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 
    24892545        return 0 
     2546         
    24902547      end if 
    24912548       
    2492       relpath = fname 
    2493       delete char 1 to mplen of relpath 
    2494        
    2495       newpath = workingFolder & relpath 
    2496       newpathDir = newpath 
    2497       delete the last item of newpathDir 
    2498       -- if baFolderExists(newpathDir) <> 1 then baCreateFolder(newpathDir) 
    2499       -- baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 
    2500        
    2501     else 
    2502        
    2503       -- musty something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 
    2504       return 0 
    2505        
    2506     end if 
     2549    end repeat 
    25072550     
    25082551    the itemdelimiter = olddelim 
     
    25102553  else 
    25112554     
    2512     newpath = fname 
     2555    repeat with actCL in castlibList 
     2556      fname = castlib(actCL).filename 
     2557      newpath = fname 
     2558      if isMac then 
     2559        castlibPathList.add([#newpath:newpath, #newpathUnix: baUnixName(newpath), #fname:fname]) 
     2560      else 
     2561        castlibPathList.add([#newpath:newpath, #newpathUnix: newpath, #fname:fname]) 
     2562      end if 
     2563    end repeat 
     2564     
    25132565  end if 
    25142566  --------------------------------------- 
     
    25392591    svnBinary = baUnixName(svnBinary) 
    25402592    workingFolderUnix = baUnixName(workingFolder) 
    2541     newpathUnix = baUnixName(newpath) 
     2593    -- newpathUnix = baUnixName(newpath) 
    25422594  else 
    2543     newpathUnix = newpath 
     2595    -- newpathUnix = newpath 
    25442596    workingFolderUnix = workingFolder 
    25452597    if the last char of workingFolderUnix = the last char of the applicationpath then delete the last char of workingFolderUnix 
     
    25472599   
    25482600   
    2549   mDisplayWaitStatusText me, "SVN update:" && newpathUnix 
    2550    
    2551   theresult = mDoShellCmd(me, svnBinary && "update" && QUOTE & newpathUnix & QUOTE, RETURN, 0, 1) 
    2552    
    2553    
    2554   if count(theresult) > 0 then 
    2555      
    2556     -------- reload the refreshed movie: 
    2557     if the moviepath contains workingFolder then 
    2558        
    2559       -- go to movie the moviepath & the moviename 
    2560        
     2601  mDisplayWaitStatusText me, "SVN update..." -- && newpathUnix 
     2602   
     2603  repeat with castlibPaths in castlibPathList 
     2604    theresult = mDoShellCmd(me, svnBinary && "update" && QUOTE & castlibPaths[#newpathUnix] & QUOTE, RETURN, 0, 1) 
     2605    if count(theresult) > 0 then 
     2606      if doReturnToOldMovie = 1 then go to movie oldmovie 
     2607      if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 
     2608      setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 
     2609      if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 
     2610      exit 
    25612611    else 
    2562        
    2563       if onlyUpdate_SVN_WorkingFolder <> 1 then 
    2564          
    2565         -------------------------- now get the updated movies over here: 
    2566         if the last char of workingFolder <> the last char of the applicationpath then put the last char of the applicationpath after workingFolder 
    2567          
    2568         put "Copy file from " & workingFolder & " to " & oldmoviepath 
    2569          
    2570          
    2571         erg = baCopyFileProgress(newpath, fname, "Always", "Replacing castlib with the version of the working folder", "", 33) 
     2612      put theresult[1] 
     2613    end if 
     2614  end repeat 
     2615   
     2616   
     2617   
     2618  -------- reload the refreshed movie: 
     2619  if the moviepath contains workingFolder then 
     2620     
     2621    -- go to movie the moviepath & the moviename 
     2622     
     2623  else 
     2624     
     2625    if onlyUpdate_SVN_WorkingFolder <> 1 then 
     2626       
     2627      -------------------------- now get the updated movies over here: 
     2628      if the last char of workingFolder <> the last char of the applicationpath then put the last char of the applicationpath after workingFolder 
     2629       
     2630      put "Copy file from " & workingFolder & " to " & oldmoviepath 
     2631       
     2632       
     2633      repeat with castlibPaths in castlibPathList 
     2634         
     2635        erg = baCopyFileProgress(castlibPathList[#newpath], castlibPathList[#fname], "Always", "Replacing castlib with the version of the working folder", "", 33) 
    25722636        if erg <> 0 then 
    2573           alert "An error occurred during copying the file (" & newpath & "). Error:" && erg 
     2637          alert "An error occurred during copying the file (" & castlibPathList[#newpath] & "). Error:" && erg 
    25742638        else 
    2575           put "Replaced file:" && newpath 
     2639          put "Replaced file:" && castlibPathList[#newpath] 
    25762640        end if 
    25772641         
    2578          
    2579         ---------------------------------- 
    2580          
    2581       end if 
    2582        
    2583     end if 
    2584      
    2585     put theresult[1] 
    2586      
    2587     if doReturnToOldMovie = 1 then go to movie oldmovie 
    2588      
    2589     if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 
    2590      
    2591   else 
    2592      
    2593     if doReturnToOldMovie = 1 then go to movie oldmovie 
    2594      
    2595     if dontShowAlert <> 1 then alert "svn application did not respond, something seems to have failed. :-(" 
    2596   end if 
     2642      end repeat 
     2643      ---------------------------------- 
     2644       
     2645    end if 
     2646     
     2647  end if 
     2648   
     2649   
     2650   
     2651  if doReturnToOldMovie = 1 then go to movie oldmovie 
     2652   
     2653  if dontShowAlert <> 1 then alert "Done, see the results of the svn operation in the message window." 
     2654   
    25972655   
    25982656   
     
    28752933     
    28762934    if count(castlibList) < 1 then 
    2877       alert "No castlib selected. The parameter didn't yiled a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 
     2935      alert "No castlib selected. The parameter didn't yield a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 
    28782936      if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 
    28792937      return 0 
Note: See TracChangeset for help on using the changeset viewer.