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

Changeset 21 for trunk/lingosource


Ignore:
Timestamp:
09/13/07 17:54:24 (5 years ago)
Author:
alex
Message:

compare to svn version andlers

Location:
trunk/lingosource
Files:
4 edited

Legend:

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

    r20 r21  
    162162    subli.add("mExportListOfUsedLinkedScripts me") 
    163163     
     164     
     165     
     166    li.add("") 
     167    li.add("Compare to SVN") 
     168    subli = [] 
     169    li.add(subli) 
     170    subli.add("mCompareCurrentScriptToWorkingCopy me, convertLineBreaksToUnix") 
     171    subli.add("mExportCurrentScriptToWorkingCopyAndOpen me, convertLineBreaksToUnix") 
     172     
    164173  end if 
    165174   
     
    198207  li.add(subli) 
    199208   
    200   subli.add("mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg, selectionListMember") 
     209  subli.add("mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg, selectionList") 
    201210  subli.add("mSVN_Commit_CurrentMovie_Binaries_AND_Scripttext me, chooseNewPath, commitMsg") 
    202211  ---------------------------------------------------- 
  • trunk/lingosource/castlib1/alexUtilities.ls

    r20 r21  
    23382338  end if 
    23392339   
    2340   bbdiffpath = shell_cmd_list("which bbdiff") 
    2341   if count(bbdiffpath) > 0 then 
    2342     bbdiffpath = bbdiffpath[1] 
    2343   else 
    2344     bbdiffpath = "" 
    2345     alert "Consider installing BBEdits command line tools. If we could use bbdiff it would be way nicer." 
    2346   end if 
     2340  --  bbdiffpath = shell_cmd_list("which bbdiff") 
     2341  --  if count(bbdiffpath) > 0 then 
     2342  --    bbdiffpath = bbdiffpath[1] 
     2343  --  else 
     2344  --    bbdiffpath = "" 
     2345  --    alert "Consider installing BBEdits command line tools. If we could use bbdiff it would be way nicer." 
     2346  --  end if 
    23472347   
    23482348   
     
    30853085 
    30863086 
    3087  
     3087-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     3088 
     3089on mCompareCurrentScriptToWorkingCopy me, convertLineBreaksToUnix 
     3090   
     3091   
     3092  if not(the platform contains "mac") then 
     3093    alert "This function only works with BBDiff, a command line tool provided by the OSX app BBEdit. I am sure, something similar exists for windows too, but you'll need to change this script yourself for windows" 
     3094    exit 
     3095  end if 
     3096   
     3097  if mCheckForXtra(me, "Shell") = 0 then 
     3098    mShellXtraMissing me 
     3099    exit 
     3100  end if 
     3101   
     3102   
     3103  bbdiffpath = mFindUnixAppInPath(me, "bbdiff") 
     3104  if length(bbdiffpath) < 1 then 
     3105    alert "This function only works with BBDiff, a command line tool provided by BBEdit. Consider installing BBEdits command line tools, it is really helpful." 
     3106    exit 
     3107  end if 
     3108   
     3109   
     3110   
     3111  cl = the activecastlib 
     3112  sel = the selection of castlib cl 
     3113   
     3114  repeat with sub in sel 
     3115    repeat with mem = sub[1] to sub[2] 
     3116      memref = member(mem,cl)    
     3117      if memref.type = #script then 
     3118         
     3119        thePath = mFindWorkingCopyCounterpart(me, memref) 
     3120         
     3121        if length(thePath) < 1 then 
     3122          alert "Corresponding member was not found" 
     3123          exit   
     3124        end if 
     3125         
     3126        st = memref.scripttext 
     3127         
     3128         
     3129        --------------------- 
     3130        -- create a temporary file from scripttext: 
     3131        tempSrcPath = shell_cmd_list("mktemp -t temp_BBDiff_file1") 
     3132        tempSrcPath = tempSrcPath[1] 
     3133         
     3134        if mCheckForXtra(me, "budapi") = 0 then 
     3135          tempSrcHFSPath = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE) 
     3136          tempSrcHFSPath = tempSrcHFSPath[1] 
     3137        else 
     3138          tempSrcHFSPath = baHFSName(tempSrcPath) 
     3139        end if 
     3140         
     3141         
     3142         
     3143        ------------------------------------------ trac subversion support works better with unix linebreaks... 
     3144        if voidP(convertLineBreaksToUnix) then convertLineBreaksToUnix = 1 
     3145        if convertLineBreaksToUnix = "" then convertLineBreaksToUnix = 1 
     3146         
     3147        if convertLineBreaksToUnix = 1 then 
     3148           
     3149          if mCheckForXtra(me, "Pregex") = 1 then 
     3150             
     3151            scrTextLi = [st] 
     3152            pregex_replace(scrTextLi, "\x0D\x0A?", "g", "\x0A") 
     3153            st = scrTextLi[1] 
     3154             
     3155          else 
     3156             
     3157            fndStr = numToChar(13) & numToChar(10) 
     3158            offs = offset(fndStr, st) 
     3159            repeat while offs > 0 
     3160              delete char offs of st 
     3161              offs = offset(fndStr, st) 
     3162            end repeat 
     3163             
     3164            fndStr = numToChar(13) 
     3165            offs = offset(fndStr, st) 
     3166            repeat while offs > 0 
     3167              put numToChar(10) into char offs of st 
     3168              offs = offset(fndStr, st) 
     3169            end repeat 
     3170             
     3171          end if 
     3172        end if 
     3173        ----------------------------------------- 
     3174         
     3175         
     3176         
     3177        theResult = mSaveTextToTempFile(me, st, tempSrcHFSPath) 
     3178        --------------------- 
     3179         
     3180         
     3181         
     3182        if mCheckForXtra(me, "budapi") = 0 then 
     3183          comm = thePath 
     3184          offs = offset(":", comm) 
     3185          repeat while offs 
     3186            put "/" into char offs of comm 
     3187            offs = offset(":", comm) 
     3188          end repeat 
     3189          put "/Volumes/" before comm 
     3190        else 
     3191          comm = baUnixName(thePath) 
     3192        end if 
     3193         
     3194        shell_cmd(bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " &QUOTE& tempSrcPath &QUOTE&&QUOTE& comm &QUOTE) 
     3195         
     3196        -- since we used the --wait and the --resume switch, we will only come to this line AFTER the diff process in bbedit is finished 
     3197         
     3198         
     3199        -------- now write the results of the BBEdit diff back into the script members 
     3200        scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 
     3201         
     3202         
     3203        if convertLineBreaksToUnix = 1 then 
     3204          ------------------------------------------ trac subversion support works better with unix linebreaks... 
     3205          if mCheckForXtra(me, "Pregex") = 1 then 
     3206             
     3207            scrTextLi = [scrText] 
     3208            if the platform contains "mac" then 
     3209              pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 
     3210            else 
     3211              pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 
     3212              pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 
     3213            end if 
     3214            scrText = scrTextLi[1] 
     3215             
     3216          else 
     3217             
     3218            if the platform contains "mac" then 
     3219               
     3220              -- first convert windows to mac 
     3221              fndStr = numToChar(13) & numToChar(10) 
     3222              offs = offset(fndStr, scrText) 
     3223              repeat while offs > 0 
     3224                put numToChar(13) into char offs to offs+1 of scrText 
     3225                offs = offset(fndStr, scrText) 
     3226              end repeat 
     3227               
     3228              -- now convert unix to mac 
     3229              fndStr = numToChar(10) 
     3230              offs = offset(fndStr, scrText) 
     3231              repeat while offs > 0 
     3232                put numToChar(13) into char offs of scrText 
     3233                offs = offset(fndStr, scrText) 
     3234              end repeat 
     3235               
     3236            else 
     3237               
     3238              fndStr = numToChar(13) & numToChar(10) 
     3239              offs = offset(fndStr, scrText) 
     3240              repeat while offs > 0 
     3241                put "ÀÀÀ" into char offs+1 of scrText 
     3242                offs = offset(fndStr, scrText) 
     3243              end repeat 
     3244               
     3245               
     3246              fndStr = numToChar(10) 
     3247              offs = offset(fndStr, scrText) 
     3248              repeat while offs > 0 
     3249                put numToChar(13) & numToChar(10) into char offs of scrText 
     3250                offs = offset(fndStr, scrText) 
     3251              end repeat 
     3252               
     3253               
     3254               
     3255              fndStr = numToChar(13) & "ÀÀÀ" 
     3256              offs = offset(fndStr, scrText) 
     3257              repeat while offs > 0 
     3258                put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText 
     3259                offs = offset(fndStr, scrText) 
     3260              end repeat 
     3261               
     3262               
     3263               
     3264              fndStr = "ÀÀÀ" 
     3265              offs = offset(fndStr, scrText) 
     3266              repeat while offs > 0 
     3267                put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 
     3268                offs = offset(fndStr, scrText) 
     3269              end repeat 
     3270               
     3271            end if 
     3272             
     3273          end if 
     3274          ----------------------------------------- 
     3275        end if 
     3276         
     3277         
     3278        memref.scripttext = scrText 
     3279         
     3280      end if 
     3281       
     3282    end repeat 
     3283  end repeat 
     3284   
     3285   
     3286   
     3287   
     3288   
     3289   
     3290   
     3291end 
     3292 
     3293-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     3294 
     3295on mFindUnixAppInPath me, whichBinaryName 
     3296   
     3297  binaryPath = [] 
     3298   
     3299  binaryPath = shell_cmd_list("for thisBinPath in /usr/bin /bin /usr/sbin /sbin /usr/local/sbin /usr/local/bin /opt/sbin /opt/bin /opt/local/sbin /opt/local/bin /sw/bin /sw/sbin ; do find $thisBinPath -name " & whichBinaryName & " ; done") 
     3300   
     3301  if count(binaryPath) > 0 then return binaryPath[1] 
     3302   
     3303  return "" 
     3304   
     3305end 
     3306 
     3307 
     3308-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     3309-- this can be used to open the corresponding script in bbedit and svn compare it to head 
     3310 
     3311on mExportCurrentScriptToWorkingCopyAndOpen me, convertLineBreaksToUnix 
     3312   
     3313  mExportScriptsToFolder me, 1, 1, convertLineBreaksToUnix 
     3314   
     3315  cl = the activecastlib 
     3316  sel = the selection of castlib cl 
     3317   
     3318  repeat with sub in sel 
     3319    repeat with mem = sub[1] to sub[2] 
     3320      memref = member(mem,cl)    
     3321      if memref.type = #script then 
     3322         
     3323        thePath = mFindWorkingCopyCounterpart(me, memref) 
     3324         
     3325        if length(thePath) < 1 then 
     3326          alert "Corresponding member was not found" 
     3327          exit   
     3328        end if 
     3329         
     3330        st = memref.scripttext 
     3331         
     3332        mSaveToTextFile me, st, thePath 
     3333         
     3334        if the platform contains "mac" then 
     3335          if (mCheckForXtra(me, "budapi") + mCheckForXtra(me, "shell")) = 2 then 
     3336             
     3337            bbeditBinary = mFindUnixAppInPath(me, "bbedit") 
     3338            if length(bbeditBinary) > 0 then 
     3339              shell_cmd(bbeditBinary && QUOTE & baUnixName(thePath) & QUOTE) 
     3340              exit 
     3341            end if 
     3342             
     3343          end if 
     3344        end if 
     3345         
     3346        open thePath 
     3347        exit 
     3348         
     3349      end if 
     3350       
     3351    end repeat 
     3352  end repeat 
     3353   
     3354end 
     3355 
     3356-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     3357 
     3358on mFindWorkingCopyCounterpart me, memref 
     3359   
     3360  workingCopies = value(getPref("svn_workingCopies_paths.txt")) 
     3361  if ilk(workingCopies) <> #proplist then workingCopies = [:] 
     3362   
     3363  theFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, 0, workingCopies, "No working copy is specified for this movies scripttext. Please select a working copy for the scripttext now.") 
     3364   
     3365  if length(theFolder) < 1 then return "" 
     3366   
     3367   
     3368  m = memref.castlibnum 
     3369   
     3370  delim = the last char of the applicationpath 
     3371  olddelim = the itemdelimiter 
     3372  the itemdelimiter = delim 
     3373  theFoldername = theFolder 
     3374  if the last char of theFoldername = delim then delete the last char of theFoldername 
     3375  else put delim after theFolder 
     3376  theFoldername = the last item of theFoldername 
     3377  the itemdelimiter = olddelim 
     3378   
     3379  infolist = 0 
     3380   
     3381  if theFoldername <> "castlib" & m then 
     3382     
     3383    newPath = theFolder & "castlib" & m 
     3384     
     3385    if baFolderExists(newPath) = 0 then 
     3386       
     3387      infolistPath = theFolder & "memberInfo.xml" 
     3388       
     3389      infolist = mReadXML_2_List(me, infolistPath) 
     3390       
     3391      if ilk(infolist) <> #proplist then 
     3392         
     3393        alert "The specified folder doesn't seem to contain info for this castlib: file memberInfo.xml missing." 
     3394        return "" 
     3395         
     3396      else 
     3397         
     3398        theFolder = newPath 
     3399         
     3400      end if 
     3401       
     3402    else 
     3403       
     3404      theFolder = newPath 
     3405       
     3406    end if 
     3407     
     3408  end if 
     3409   
     3410   
     3411  if infolist = 0 then 
     3412     
     3413    infolistPath = theFolder & "memberInfo.xml" 
     3414    infolist = mReadXML_2_List(me, infolistPath) 
     3415     
     3416    if ilk(infolist) <> #proplist then 
     3417       
     3418      alert "The specified folder doesn't seem to contain info for this castlib: file memberInfo.xml missing." 
     3419      return "" 
     3420       
     3421    end if 
     3422     
     3423  end if 
     3424   
     3425   
     3426   
     3427   
     3428  cnt = count(infolist) 
     3429   
     3430  repeat with l = 1 to cnt 
     3431    li = infolist[l] 
     3432    if li.getaprop(#memberName) = memref.name then 
     3433       
     3434      fname = string(infolist[l].getaprop(#fname)) 
     3435      if length(fname) < 1 then fname = string(infolist.getpropat(l)) 
     3436      fpath = theFolder & fname & ".ls" 
     3437       
     3438      if baFileExists(fpath) then return fpath 
     3439       
     3440    end if 
     3441  end repeat 
     3442   
     3443   
     3444  return "" 
     3445   
     3446end 
    30883447 
    30893448-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     
    32683627           
    32693628          ------------------------------------------ trac subversion support works better with unix linebreaks... 
     3629          if voidP(convertLineBreaksToUnix) then convertLineBreaksToUnix = 1 
     3630          if convertLineBreaksToUnix = "" then convertLineBreaksToUnix = 1 
     3631           
    32703632          if convertLineBreaksToUnix = 1 then 
    32713633             
     
    33573719           
    33583720           
    3359           infolist.setaprop(origname, [#scripttype: memref.scripttype, #comments: memref.comments, #membername: memname]) 
     3721          infolist.setaprop(symbol(origname), [#scripttype: memref.scripttype, #comments: memref.comments, #membername: memname, #fname: origname]) 
     3722          -- we need to store origname as string additionally to symbol, as the symbol may change the case (although only ufs is case sensitive 
     3723          -- I am more comfortable with not relying on case insensitivity of filesystems) 
    33603724           
    33613725        end if 
     
    35073871  repeat with n = 1 to cnt 
    35083872    thisMemberInfo = infoList[n] 
    3509     fpath = thePath & infoList.getPropAt(n) 
     3873    fname = string(thisMemberInfo.getaprop(#fname)) 
     3874    if length(fname) < 1 then fname = string(infoList.getPropAt(n)) 
     3875    fpath = thePath & fname 
    35103876    mImportScriptWithThumbnail me, fpath & ".ls", fd, 1, thisMemberInfo 
    35113877  end repeat 
     
    35833949  sel = the selection of castlib cl 
    35843950  anz = sel.count 
    3585   cnt = 1 
     3951  cnt = count(infolist) 
    35863952  repeat with n = 1 to anz 
    35873953    repeat with m = sel[n][1] to sel[n][2] 
     
    35933959          li = infolist[l] 
    35943960          if li.getaprop(#memberName) = memref.name then 
    3595             fpath = thePath & infolist.getpropat(l) & ".ls" 
     3961             
     3962            fname = string(infolist[l].getaprop(#fname)) 
     3963            if length(fname) < 1 then fname = string(infolist.getpropat(l)) 
     3964            fpath = thePath & fname & ".ls" 
    35963965             
    35973966            if baFileExists(fpath) then 
     
    36724041    if ilk(infolist) <> #proplist then infolist = [:] 
    36734042     
    3674     infolist = infolist.getaprop(fname) 
     4043    infolist = infolist.getaprop(symbol(fname)) 
    36754044    if ilk(infolist) <> #proplist then infolist = [:] 
    36764045  end if 
     
    37724141      pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 
    37734142    else 
    3774       pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D\x0A") 
     4143      pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 
     4144      pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 
    37754145    end if 
    37764146    scrText = scrTextLi[1] 
     
    37804150    if the platform contains "mac" then 
    37814151       
     4152      -- first convert windows to mac 
    37824153      fndStr = numToChar(13) & numToChar(10) 
    37834154      offs = offset(fndStr, scrText) 
     
    37874158      end repeat 
    37884159       
     4160      -- now convert unix to mac 
     4161      fndStr = numToChar(10) 
     4162      offs = offset(fndStr, scrText) 
     4163      repeat while offs > 0 
     4164        put numToChar(13) into char offs of scrText 
     4165        offs = offset(fndStr, scrText) 
     4166      end repeat 
     4167       
    37894168    else 
     4169       
     4170       
     4171      --      fndStr = numToChar(13) & numToChar(10) 
     4172      --      offs = offset(fndStr, scrText) 
     4173      --      repeat while offs > 0 
     4174      --        delete char offs of scrText 
     4175      --        offs = offset(fndStr, scrText) 
     4176      --      end repeat 
    37904177       
    37914178      fndStr = numToChar(13) & numToChar(10) 
    37924179      offs = offset(fndStr, scrText) 
    37934180      repeat while offs > 0 
    3794         delete char offs of scrText 
     4181        put "ÀÀÀ" into char offs+1 of scrText 
    37954182        offs = offset(fndStr, scrText) 
    37964183      end repeat 
     4184       
     4185       
     4186      fndStr = numToChar(10) 
     4187      offs = offset(fndStr, scrText) 
     4188      repeat while offs > 0 
     4189        put numToChar(13) & numToChar(10) into char offs of scrText 
     4190        offs = offset(fndStr, scrText) 
     4191      end repeat 
     4192       
    37974193       
    37984194       
     
    38034199        offs = offset(fndStr, scrText) 
    38044200      end repeat 
     4201       
    38054202       
    38064203       
     
    39694366           
    39704367          if li.getaprop(#memberName) = memref.name then 
    3971             fpath = thePath & infolist.getpropat(l) & ".ls" 
     4368             
     4369            theFilename = string(li.getaprop(#fname)) 
     4370            if length(theFilename) < 1 then theFilename = string(infolist.getpropat(l)) 
     4371             
     4372            fpath = thePath & theFilename & ".ls" 
    39724373             
    39734374            if baFileExists(fpath) then 
     
    40694470-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    40704471 
    4071 on mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg, selectionListMember 
     4472on mSVN_Commit_SelectedCastlib_AND_Scripttext me, chooseNewPath, commitMsg, selectionList 
    40724473   
    40734474  commitMsg = string(commitMsg) 
     
    40814482  end if 
    40824483   
    4083   theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1, selectionListMember) 
    4084    
    4085   theResult = mSVN_Commit_SelectedCastlib(me, chooseNewPath, commitMsg, 1, 0, selectionListMember) 
    4086    
    4087 end 
    4088  
    4089 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    4090  
    4091 on mSVN_Commit_SelectedCastlib me, chooseNewPath, commitMsg, dontSave, dontShowAlert, selectionListMember 
     4484  theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1, selectionList) 
     4485   
     4486  theResult = mSVN_Commit_SelectedCastlib(me, chooseNewPath, commitMsg, 1, 0, selectionList) 
     4487   
     4488end 
     4489 
     4490-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     4491 
     4492on mSVN_Commit_SelectedCastlib me, chooseNewPath, commitMsg, dontSave, dontShowAlert, selectionList 
    40924493   
    40934494   
    40944495  castlibList = 0 
    4095   selectionListMember = member(selectionListMember) 
    4096   if length(selectionListMember) > 0 then 
    4097     mem = member(selectionListMember) 
    4098     if not(voidP(mem)) then 
    4099       dertext = mem.text 
    4100       dertext = value(dertext.line[1]) 
    4101       if listP(dertext) then 
    4102         castlibList = [] 
    4103         dertextCnt = count(dertext) 
    4104         repeat with n = 1 to dertextCnt 
    4105           if listP(dertext[n]) then 
    4106             castlibList.add(n) 
     4496  selectionList = string(selectionList) 
     4497  if length(selectionList) > 0 then 
     4498    if char 1 of selectionList <> "[" then put "[" before selectionList 
     4499    if the last char of selectionList <> "]" then put "]" after selectionList 
     4500    selectionList = value(selectionList) 
     4501    if listP(selectionList) then 
     4502      clnum = the number of castlibs + 1 
     4503      castlibList = [] 
     4504      selectionListCnt = count(selectionList) 
     4505      repeat with n = 1 to selectionListCnt 
     4506        int = integer(selectionList[n]) 
     4507        if integerP(int) then 
     4508          if clnum > int then 
     4509            if castlibList.getPos(int) < 1 then castlibList.add(int) 
    41074510          end if 
    4108         end repeat 
    4109       end if 
     4511        end if 
     4512      end repeat 
    41104513    end if 
    41114514  end if 
     
    41274530  end repeat 
    41284531   
    4129   if count(castlibList) < 1 then return 0 
     4532   
     4533  if count(castlibList) < 1 then 
     4534    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." 
     4535    return 0 
     4536  end if 
     4537   
     4538  put "Committing castlibs:" && castlibList 
    41304539   
    41314540   
     
    41964605     
    41974606     
    4198     repeat with cl in castlibList 
     4607    castlibListCnt = count(castlibList) 
     4608    repeat with r = 1 to castlibListCnt 
     4609      cl = castlibList[r] 
    41994610       
    42004611      fname = castlib(cl).filename 
     
    42174628        baCopyFileProgress(fname, newpath, "Always", "Copying castlib " & actCL & " to working folder", "", 33) 
    42184629         
    4219         castlibList[cl] = [cl, fname, newpath, newpathDir] 
     4630        castlibList[r] = [cl, fname, newpath, newpathDir] 
    42204631         
    42214632      else 
     
    42334644  else 
    42344645     
    4235     repeat with cl in castlibList 
     4646    castlibListCnt = count(castlibList) 
     4647    repeat with r = 1 to castlibListCnt 
     4648      cl = castlibList[r] 
    42364649      newpath = fname 
    42374650      castlibList[cl] = [cl, fname, fname] 
     
    42474660    workingFolder = baUnixName(workingFolder) 
    42484661     
    4249     repeat with cl in castlibList 
    4250       castlibList[cl][3] = baUnixName(castlibList[cl][3]) 
     4662    castlibListCnt = count(castlibList) 
     4663    repeat with r = 1 to castlibListCnt 
     4664      castlibList[r][3] = baUnixName(castlibList[r][3]) 
    42514665    end repeat 
    42524666     
     
    42574671   
    42584672   
    4259    
    4260   repeat with cl in castlibList 
     4673  isChanged = 0 
     4674  castlibListCnt = count(castlibList) 
     4675  repeat with r = 1 to castlibListCnt 
     4676    --    cl = castlibList[r] 
     4677    --  repeat with cl in castlibList 
    42614678    --------------------------------------- 
    4262     theresult = shell_cmd_list(svnBinary && "update" && QUOTE & castlibList[cl][3] & QUOTE) 
     4679    theresult = shell_cmd_list(svnBinary && "update" && QUOTE & castlibList[r][3] & QUOTE) 
    42634680     
    42644681    if count(theresult) < 1 then 
    4265       theresult = shell_cmd_list(svnBinary && "update" && QUOTE & castlibList[cl][3] & QUOTE && "2>&1") 
     4682      theresult = shell_cmd_list(svnBinary && "update" && QUOTE & castlibList[r][3] & QUOTE && "2>&1") 
    42664683      if count(theresult) < 1 then 
    42674684        theError = theresult[1] 
     
    42764693     
    42774694     
    4278     theresult = shell_cmd_list(svnBinary && "status" && QUOTE & castlibList[cl][3] & QUOTE) 
     4695    theresult = shell_cmd_list(svnBinary && "status" && QUOTE & castlibList[r][3] & QUOTE) 
    42794696     
    42804697    cnt = count(theresult) 
    4281     if cnt < 1 then 
    4282       alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 
    4283       return 0 
     4698    if cnt > 0 then 
     4699      isChanged = 1 
     4700      --      alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 
     4701      --      return 0 
    42844702    end if 
    42854703     
    42864704  end repeat 
    42874705   
     4706  if isChanged = 0 then 
     4707    alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 
     4708    return 0  
     4709  end if 
     4710   
     4711   
    42884712  pathStr = "" 
    4289   repeat with cl in castlibList 
    4290     put " " & QUOTE & castlibList[cl][3] & QUOTE after pathStr 
     4713  castlibListCnt = count(castlibList) 
     4714  repeat with r = 1 to castlibListCnt 
     4715    put " " & QUOTE & castlibList[r][3] & QUOTE after pathStr 
    42914716  end repeat 
    42924717   
     
    47575182-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    47585183 
    4759 on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg, dontShowAlert, selectionListMember 
     5184on mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only, chooseNewPath, commitMsg, dontShowAlert, selectionList 
    47605185   
    47615186  workingCopies = value(getPref("svn_workingCopies_paths.txt")) 
     
    48055230    ----------------------------------------------------- 
    48065231     
    4807     selectionListMember = member(selectionListMember) 
    4808     if length(selectionListMember) > 0 then 
    4809       mem = member(selectionListMember) 
    4810       if not(voidP(mem)) then 
    4811         dertext = mem.text 
    4812         dertext = value(dertext.line[1]) 
    4813         if listP(dertext) then 
    4814           castlibList = [] 
    4815           dertextCnt = count(dertext) 
    4816           repeat with n = 1 to dertextCnt 
    4817             if listP(dertext[n]) then 
    4818               castlibList.add(n) 
     5232    selectionList = string(selectionList) 
     5233    if length(selectionList) > 0 then 
     5234       
     5235      if char 1 of selectionList <> "[" then put "[" before selectionList 
     5236      if the last char of selectionList <> "]" then put "]" after selectionList 
     5237       
     5238      selectionList = value(selectionList) 
     5239      if listP(selectionList) then 
     5240        clnum = the number of castlibs + 1 
     5241        castlibList = [] 
     5242        selectionListCnt = count(selectionList) 
     5243        repeat with n = 1 to selectionListCnt 
     5244          int = integer(selectionList[n]) 
     5245          if integerP(int) then 
     5246            if clnum > int then 
     5247              if castlibList.getPos(int) < 1 then castlibList.add(int) 
    48195248            end if 
    4820           end repeat 
    4821         end if 
     5249          end if 
     5250        end repeat 
    48225251      end if 
    48235252    end if 
     
    48385267    end repeat 
    48395268     
    4840     if count(castlibList) < 1 then return 0 
     5269     
     5270    if count(castlibList) < 1 then 
     5271      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." 
     5272      return 0 
     5273    end if 
     5274     
     5275     
     5276    put "Commiting scripttext for castlibs:" && castlibList 
    48415277    ----------------------------------------------------- 
    48425278     
  • trunk/lingosource/castlib1/memberInfo.xml

    r1 r21  
    55                <comments></comments> 
    66                <memberName>thisMoviesScript</memberName> 
     7                <fname>thisMoviesScript</fname> 
    78        </thisMoviesScript> 
    89        <keyboardNavigation_FrameLoop> 
     
    1011                <comments></comments> 
    1112                <memberName>keyboardNavigation_FrameLoop</memberName> 
     13                <fname>keyboardNavigation_FrameLoop</fname> 
    1214        </keyboardNavigation_FrameLoop> 
    1315        <simpleBMMenu> 
     
    1517                <comments></comments> 
    1618                <memberName>simpleBMMenu</memberName> 
     19                <fname>simpleBMMenu</fname> 
    1720        </simpleBMMenu> 
    1821        <OSCmenu_Utilities> 
     
    2023                <comments></comments> 
    2124                <memberName>OSCmenu_Utilities</memberName> 
     25                <fname>OSCmenu_Utilities</fname> 
    2226        </OSCmenu_Utilities> 
    2327        <alexUtilities> 
     
    2529                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    2630                <memberName>alexUtilities</memberName> 
     31                <fname>alexUtilities</fname> 
    2732        </alexUtilities> 
    2833        <convert_Lingo_2_CSS_Html> 
     
    3035                <comments>~/Documents/Scripts/lingo/convert_Lingo_2_CSS_Html.ls</comments> 
    3136                <memberName>convert_Lingo_2_CSS_Html</memberName> 
     37                <fname>convert_Lingo_2_CSS_Html</fname> 
    3238        </convert_Lingo_2_CSS_Html> 
    3339        <OSCmenu_Handlers> 
     
    3541                <comments></comments> 
    3642                <memberName>OSCmenu_Handlers</memberName> 
     43                <fname>OSCmenu_Handlers</fname> 
    3744        </OSCmenu_Handlers> 
    3845        <resizewindowfs> 
     
    4047                <comments></comments> 
    4148                <memberName>resizewindowfs</memberName> 
     49                <fname>resizewindowfs</fname> 
    4250        </resizewindowfs> 
    4351        <showHideHelp> 
     
    4553                <comments></comments> 
    4654                <memberName>showHideHelp</memberName> 
     55                <fname>showHideHelp</fname> 
    4756        </showHideHelp> 
    4857        <texthyperlinkBehavior> 
     
    5059                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/texthyperlinkBehavior.ls</comments> 
    5160                <memberName>texthyperlinkBehavior</memberName> 
     61                <fname>texthyperlinkBehavior</fname> 
    5262        </texthyperlinkBehavior> 
    5363        <bbdiff> 
     
    5565                <comments></comments> 
    5666                <memberName>bbdiff</memberName> 
     67                <fname>bbdiff</fname> 
    5768        </bbdiff> 
    5869</Untitled> 
  • trunk/lingosource/castlib2/memberInfo.xml

    r20 r21  
    55                <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    66                <memberName>commonMovieScript</memberName> 
     7                <fname>commonMovieScript</fname> 
    78        </commonmoviescript> 
    89        <FileIOFunktionen> 
     
    1011                <comments>~/Documents/Scripts/lingo/FileIOFunktionen.ls</comments> 
    1112                <memberName>FileIOFunktionen</memberName> 
     13                <fname>FileIOFunktionen</fname> 
    1214        </FileIOFunktionen> 
    1315        <GetSetPrefs> 
     
    1517                <comments>~/Documents/Scripts/lingo/GetSetPrefs.ls</comments> 
    1618                <memberName>GetSetPrefs</memberName> 
     19                <fname>GetSetPrefs</fname> 
    1720        </GetSetPrefs> 
    1821        <aleXtrasMovieScript> 
     
    2023                <comments>~/Documents/Scripts/lingo/aleXtrasMovieScript.ls</comments> 
    2124                <memberName>aleXtrasMovieScript</memberName> 
     25                <fname>aleXtrasMovieScript</fname> 
    2226        </aleXtrasMovieScript> 
    2327        <PseudoXMLPS> 
     
    2529                <comments>~/Documents/Scripts/lingo/PseudoXMLPS.ls</comments> 
    2630                <memberName>PseudoXMLPS</memberName> 
     31                <fname>PseudoXMLPS</fname> 
    2732        </PseudoXMLPS> 
    2833        <simpleGoToAction> 
     
    3035                <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/simpleGoToAction.ls</comments> 
    3136                <memberName>simpleGoToAction</memberName> 
     37                <fname>simpleGoToAction</fname> 
    3238        </simpleGoToAction> 
    3339        <SpriteNameBeaver> 
     
    3541                <comments>~/Documents/Scripts/lingo/SpriteNameBeaver.ls</comments> 
    3642                <memberName>SpriteNameBeaver</memberName> 
     43                <fname>SpriteNameBeaver</fname> 
    3744        </SpriteNameBeaver> 
    38         <commonmoviescript> 
    39                 <scriptType>#parent</scriptType> 
    40                 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    41                 <memberName>commonMovieScript</memberName> 
    42         </commonmoviescript> 
    43         <commonmoviescript> 
    44                 <scriptType>#parent</scriptType> 
    45                 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    46                 <memberName>commonMovieScript</memberName> 
    47         </commonmoviescript> 
    48         <commonmoviescript> 
    49                 <scriptType>#parent</scriptType> 
    50                 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    51                 <memberName>commonMovieScript</memberName> 
    52         </commonmoviescript> 
    53         <commonMovieScript> 
    54                 <scriptType>#parent</scriptType> 
    55                 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 
    56                 <memberName>commonMovieScript</memberName> 
    57         </commonMovieScript> 
    5845</Untitled> 
Note: See TracChangeset for help on using the changeset viewer.