Changeset 45 for trunk/lingosource
- Timestamp:
- 10/25/07 13:41:26 (5 years ago)
- Location:
- trunk/lingosource
- Files:
-
- 4 edited
-
castlib1/OSCmenu_Utilities.ls (modified) (1 diff)
-
castlib1/alexUtilities.ls (modified) (1 diff)
-
castlib1/memberInfo.xml (modified) (21 diffs)
-
castlib2/memberInfo.xml (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r42 r45 235 235 subli = [] 236 236 li.add(subli) 237 subli.add("Compare selected script with Working Copy...")238 pLookUpCommandList.setaprop("Compare selected script with Working Copy...", "mCompareCurrentScriptToWorkingCopy me, convertLineBreaksToUnix")237 subli.add("Compare selected scripts with Working Copy...") 238 pLookUpCommandList.setaprop("Compare selected scripts with Working Copy...", "mCompareCurrentScriptToWorkingCopy me, convertLineBreaksToUnix") 239 239 240 240 subli.add("Export selected script to Working Copy and Open...") -
trunk/lingosource/castlib1/alexUtilities.ls
r42 r45 3246 3246 3247 3247 if length(thePath) < 1 then 3248 alert "Corresponding member was not found" 3249 exit 3250 end if 3251 3252 3253 3254 --------------------- 3255 -- create a temporary file from scripttext: 3256 tempSrcPath = shell_cmd_list("mktemp -t temp_BBDiff_file1") 3257 tempSrcPath = tempSrcPath[1] 3258 3259 if mCheckForXtra(me, "budapi") = 0 then 3260 tempSrcHFSPath = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE) 3261 tempSrcHFSPath = tempSrcHFSPath[1] 3248 3249 put "Corresponding file for member " & memref.name && "(" & memref & ") was not found" 3250 3251 3262 3252 else 3263 tempSrcHFSPath = baHFSName(tempSrcPath) 3264 end if 3265 3266 3267 3268 ------------------------------------------ trac subversion support works better with unix linebreaks... 3269 if voidP(convertLineBreaksToUnix) then convertLineBreaksToUnix = 1 3270 if convertLineBreaksToUnix = "" then convertLineBreaksToUnix = 1 3271 3272 if convertLineBreaksToUnix = 1 then 3273 3274 if mCheckForXtra(me, "Pregex") = 1 then 3275 3276 scrTextLi = [st] 3277 pregex_replace(scrTextLi, "\x0D\x0A?", "g", "\x0A") 3278 st = scrTextLi[1] 3279 3253 3254 3255 3256 --------------------- 3257 -- create a temporary file from scripttext: 3258 tempSrcPath = shell_cmd_list("mktemp -t temp_BBDiff_file1") 3259 tempSrcPath = tempSrcPath[1] 3260 3261 if mCheckForXtra(me, "budapi") = 0 then 3262 tempSrcHFSPath = shell_cmd_list("osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE) 3263 tempSrcHFSPath = tempSrcHFSPath[1] 3280 3264 else 3281 3282 fndStr = numToChar(13) & numToChar(10) 3283 offs = offset(fndStr, st) 3284 repeat while offs > 0 3285 delete char offs of st 3286 offs = offset(fndStr, st) 3287 end repeat 3288 3289 fndStr = numToChar(13) 3290 offs = offset(fndStr, st) 3291 repeat while offs > 0 3292 put numToChar(10) into char offs of st 3293 offs = offset(fndStr, st) 3294 end repeat 3295 3265 tempSrcHFSPath = baHFSName(tempSrcPath) 3296 3266 end if 3297 end if 3298 ----------------------------------------- 3299 3300 3301 3302 theResult = mSaveTextToTempFile(me, st, tempSrcHFSPath) 3303 --------------------- 3304 3305 3306 3307 if mCheckForXtra(me, "budapi") = 0 then 3308 comm = thePath 3309 offs = offset(":", comm) 3310 repeat while offs 3311 put "/" into char offs of comm 3312 offs = offset(":", comm) 3313 end repeat 3314 put "/Volumes/" before comm 3315 else 3316 comm = baUnixName(thePath) 3317 end if 3318 3319 theResult = shell_cmd_list(bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E && "2>&1") 3320 3321 -- since we used the --wait and the --resume switch, we will only come to this line AFTER the diff process in bbedit is finished 3322 3323 if count(theResult) > 0 then 3324 alert "No differences found" 3325 3326 else 3327 3328 -------- now write the results of the BBEdit diff back into the script members 3329 scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 3330 3267 3268 3269 3270 ------------------------------------------ trac subversion support works better with unix linebreaks... 3271 if voidP(convertLineBreaksToUnix) then convertLineBreaksToUnix = 1 3272 if convertLineBreaksToUnix = "" then convertLineBreaksToUnix = 1 3331 3273 3332 3274 if convertLineBreaksToUnix = 1 then 3333 ------------------------------------------ trac subversion support works better with unix linebreaks...3275 3334 3276 if mCheckForXtra(me, "Pregex") = 1 then 3335 3277 3336 scrTextLi = [scrText] 3337 if the platform contains "mac" then 3338 pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 3339 else 3340 pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 3341 pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 3342 end if 3343 scrText = scrTextLi[1] 3278 scrTextLi = [st] 3279 pregex_replace(scrTextLi, "\x0D\x0A?", "g", "\x0A") 3280 st = scrTextLi[1] 3344 3281 3345 3282 else 3346 3283 3347 if the platform contains "mac" then 3284 fndStr = numToChar(13) & numToChar(10) 3285 offs = offset(fndStr, st) 3286 repeat while offs > 0 3287 delete char offs of st 3288 offs = offset(fndStr, st) 3289 end repeat 3290 3291 fndStr = numToChar(13) 3292 offs = offset(fndStr, st) 3293 repeat while offs > 0 3294 put numToChar(10) into char offs of st 3295 offs = offset(fndStr, st) 3296 end repeat 3297 3298 end if 3299 end if 3300 ----------------------------------------- 3301 3302 3303 3304 theResult = mSaveTextToTempFile(me, st, tempSrcHFSPath) 3305 --------------------- 3306 3307 3308 3309 if mCheckForXtra(me, "budapi") = 0 then 3310 comm = thePath 3311 offs = offset(":", comm) 3312 repeat while offs 3313 put "/" into char offs of comm 3314 offs = offset(":", comm) 3315 end repeat 3316 put "/Volumes/" before comm 3317 else 3318 comm = baUnixName(thePath) 3319 end if 3320 3321 theResult = shell_cmd_list(bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E && "2>&1") 3322 3323 -- since we used the --wait and the --resume switch, we will only come to this line AFTER the diff process in bbedit is finished 3324 3325 if count(theResult) > 0 then 3326 put "No differences found for member: " & memref.name && "(" & memref & ")" 3327 3328 else 3329 3330 -------- now write the results of the BBEdit diff back into the script members 3331 scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 3332 3333 3334 if convertLineBreaksToUnix = 1 then 3335 ------------------------------------------ trac subversion support works better with unix linebreaks... 3336 if mCheckForXtra(me, "Pregex") = 1 then 3348 3337 3349 -- first convert windows to mac 3350 fndStr = numToChar(13) & numToChar(10) 3351 offs = offset(fndStr, scrText) 3352 repeat while offs > 0 3353 put numToChar(13) into char offs to offs+1 of scrText 3354 offs = offset(fndStr, scrText) 3355 end repeat 3356 3357 -- now convert unix to mac 3358 fndStr = numToChar(10) 3359 offs = offset(fndStr, scrText) 3360 repeat while offs > 0 3361 put numToChar(13) into char offs of scrText 3362 offs = offset(fndStr, scrText) 3363 end repeat 3338 scrTextLi = [scrText] 3339 if the platform contains "mac" then 3340 pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 3341 else 3342 pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 3343 pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 3344 end if 3345 scrText = scrTextLi[1] 3364 3346 3365 3347 else 3366 3348 3367 fndStr = numToChar(13) & numToChar(10)3368 offs = offset(fndStr, scrText)3369 repeat while offs > 03370 put "ÀÀÀ" into char offs+1 of scrText3349 if the platform contains "mac" then 3350 3351 -- first convert windows to mac 3352 fndStr = numToChar(13) & numToChar(10) 3371 3353 offs = offset(fndStr, scrText) 3372 end repeat3373 3374 3375 fndStr = numToChar(10)3376 offs = offset(fndStr, scrText)3377 repeat while offs > 03378 put numToChar(13) & numToChar(10) into char offs of scrText3354 repeat while offs > 0 3355 put numToChar(13) into char offs to offs+1 of scrText 3356 offs = offset(fndStr, scrText) 3357 end repeat 3358 3359 -- now convert unix to mac 3360 fndStr = numToChar(10) 3379 3361 offs = offset(fndStr, scrText) 3380 end repeat3381 3382 3383 3384 fndStr = numToChar(13) & "ÀÀÀ"3385 offs = offset(fndStr, scrText)3386 repeat while offs > 03387 put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText3362 repeat while offs > 0 3363 put numToChar(13) into char offs of scrText 3364 offs = offset(fndStr, scrText) 3365 end repeat 3366 3367 else 3368 3369 fndStr = numToChar(13) & numToChar(10) 3388 3370 offs = offset(fndStr, scrText) 3389 end repeat 3390 3391 3392 3393 fndStr = "ÀÀÀ" 3394 offs = offset(fndStr, scrText) 3395 repeat while offs > 0 3396 put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 3371 repeat while offs > 0 3372 put "ÀÀÀ" into char offs+1 of scrText 3373 offs = offset(fndStr, scrText) 3374 end repeat 3375 3376 3377 fndStr = numToChar(10) 3397 3378 offs = offset(fndStr, scrText) 3398 end repeat 3379 repeat while offs > 0 3380 put numToChar(13) & numToChar(10) into char offs of scrText 3381 offs = offset(fndStr, scrText) 3382 end repeat 3383 3384 3385 3386 fndStr = numToChar(13) & "ÀÀÀ" 3387 offs = offset(fndStr, scrText) 3388 repeat while offs > 0 3389 put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText 3390 offs = offset(fndStr, scrText) 3391 end repeat 3392 3393 3394 3395 fndStr = "ÀÀÀ" 3396 offs = offset(fndStr, scrText) 3397 repeat while offs > 0 3398 put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 3399 offs = offset(fndStr, scrText) 3400 end repeat 3401 3402 end if 3399 3403 3400 3404 end if 3401 3405 ----------------------------------------- 3402 3406 end if 3403 ----------------------------------------- 3407 3408 3409 3410 case memtype of 3411 3412 ----------------------- 3413 #script: 3414 memref.scripttext = scrText 3415 3416 ----------------------- 3417 #field: 3418 memref.text = scrText 3419 3420 ----------------------- 3421 #text: 3422 memref.rtf = scrText 3423 3424 ----------------------- 3425 otherwise: 3426 memref.text = scrText 3427 3428 end case 3429 3430 3431 3432 3404 3433 end if 3405 3434 3406 3407 3408 case memtype of 3409 3410 ----------------------- 3411 #script: 3412 memref.scripttext = scrText 3413 3414 ----------------------- 3415 #field: 3416 memref.text = scrText 3417 3418 ----------------------- 3419 #text: 3420 memref.rtf = scrText 3421 3422 ----------------------- 3423 otherwise: 3424 memref.text = scrText 3425 3426 end case 3427 3428 3435 -- exit -- we only proceed one script member, WHY ??? 3429 3436 3430 3437 3431 3438 end if 3432 3439 3433 exit -- we only proceed one script member 3434 3435 3436 end if 3437 3440 end if -- corresponding file not found for this member 3438 3441 3439 3442 end repeat -
trunk/lingosource/castlib1/memberInfo.xml
r42 r45 5 5 <comments></comments> 6 6 <memberName>thisMoviesScript</memberName> 7 <f Name>thisMoviesScript</fName>7 <fname>thisMoviesScript</fname> 8 8 </thisMoviesScript> 9 9 <keyboardNavigation_FrameLoop> … … 11 11 <comments></comments> 12 12 <memberName>keyboardNavigation_FrameLoop</memberName> 13 <f Name>keyboardNavigation_FrameLoop</fName>13 <fname>keyboardNavigation_FrameLoop</fname> 14 14 </keyboardNavigation_FrameLoop> 15 15 <simpleBMMenu> … … 17 17 <comments></comments> 18 18 <memberName>simpleBMMenu</memberName> 19 <f Name>simpleBMMenu</fName>19 <fname>simpleBMMenu</fname> 20 20 </simpleBMMenu> 21 21 <OSCmenu_Utilities> … … 23 23 <comments></comments> 24 24 <memberName>OSCmenu_Utilities</memberName> 25 <f Name>OSCmenu_Utilities</fName>25 <fname>OSCmenu_Utilities</fname> 26 26 </OSCmenu_Utilities> 27 27 <alexUtilities> … … 29 29 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 30 30 <memberName>alexUtilities</memberName> 31 <f Name>alexUtilities</fName>31 <fname>alexUtilities</fname> 32 32 </alexUtilities> 33 33 <convert_Lingo_2_CSS_Html> … … 35 35 <comments>~/Documents/Scripts/lingo/convert_Lingo_2_CSS_Html.ls</comments> 36 36 <memberName>convert_Lingo_2_CSS_Html</memberName> 37 <f Name>convert_Lingo_2_CSS_Html</fName>37 <fname>convert_Lingo_2_CSS_Html</fname> 38 38 </convert_Lingo_2_CSS_Html> 39 39 <OSCmenu_Handlers> … … 41 41 <comments></comments> 42 42 <memberName>OSCmenu_Handlers</memberName> 43 <f Name>OSCmenu_Handlers</fName>43 <fname>OSCmenu_Handlers</fname> 44 44 </OSCmenu_Handlers> 45 45 <resizewindowfs> … … 47 47 <comments></comments> 48 48 <memberName>resizewindowfs</memberName> 49 <f Name>resizewindowfs</fName>49 <fname>resizewindowfs</fname> 50 50 </resizewindowfs> 51 51 <showHideHelp> … … 53 53 <comments></comments> 54 54 <memberName>showHideHelp</memberName> 55 <f Name>showHideHelp</fName>55 <fname>showHideHelp</fname> 56 56 </showHideHelp> 57 57 <texthyperlinkBehavior> … … 59 59 <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/texthyperlinkBehavior.ls</comments> 60 60 <memberName>texthyperlinkBehavior</memberName> 61 <f Name>texthyperlinkBehavior</fName>61 <fname>texthyperlinkBehavior</fname> 62 62 </texthyperlinkBehavior> 63 63 <bbdiff> … … 65 65 <comments></comments> 66 66 <memberName>bbdiff</memberName> 67 <f Name>bbdiff</fName>67 <fname>bbdiff</fname> 68 68 </bbdiff> 69 69 <menu1_button> … … 71 71 <comments></comments> 72 72 <memberName>menu1_button</memberName> 73 <f Name>menu1_button</fName>73 <fname>menu1_button</fname> 74 74 </menu1_button> 75 75 <menu2_button> … … 77 77 <comments></comments> 78 78 <memberName>menu2_button</memberName> 79 <f Name>menu2_button</fName>79 <fname>menu2_button</fname> 80 80 </menu2_button> 81 81 <pastefeld> … … 83 83 <comments></comments> 84 84 <memberName>pastefeld</memberName> 85 <f Name>pastefeld</fName>85 <fname>pastefeld</fname> 86 86 </pastefeld> 87 87 <oldclipboard> … … 89 89 <comments></comments> 90 90 <memberName>oldclipboard</memberName> 91 <f Name>oldclipboard</fName>91 <fname>oldclipboard</fname> 92 92 </oldclipboard> 93 93 <searchword> … … 95 95 <comments></comments> 96 96 <memberName>searchword</memberName> 97 <f Name>searchword</fName>97 <fname>searchword</fname> 98 98 </searchword> 99 99 <helptext> … … 104 104 rtf</comments> 105 105 <memberName>helptext</memberName> 106 <f Name>helptext</fName>106 <fname>helptext</fname> 107 107 </helptext> 108 108 <statusOutput> … … 113 113 rtf</comments> 114 114 <memberName>statusOutput</memberName> 115 <f Name>statusOutput</fName>115 <fname>statusOutput</fname> 116 116 </statusOutput> 117 117 <test> … … 119 119 <comments></comments> 120 120 <memberName>test</memberName> 121 <f Name>test</fName>121 <fname>test</fname> 122 122 </test> 123 123 <tester2> … … 125 125 <comments></comments> 126 126 <memberName>tester2</memberName> 127 <f Name>tester2</fName>127 <fname>tester2</fname> 128 128 </tester2> 129 129 <tester4> … … 131 131 <comments></comments> 132 132 <memberName>tester4</memberName> 133 <f Name>tester4</fName>133 <fname>tester4</fname> 134 134 </tester4> 135 135 </Untitled> -
trunk/lingosource/castlib2/memberInfo.xml
r33 r45 5 5 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 6 6 <memberName>commonMovieScript</memberName> 7 <f Name>commonMovieScript</fName>7 <fname>commonMovieScript</fname> 8 8 </commonmoviescript> 9 9 <FileIOFunktionen> … … 11 11 <comments>~/Documents/Scripts/lingo/FileIOFunktionen.ls</comments> 12 12 <memberName>FileIOFunktionen</memberName> 13 <f Name>FileIOFunktionen</fName>13 <fname>FileIOFunktionen</fname> 14 14 </FileIOFunktionen> 15 15 <GetSetPrefs> … … 17 17 <comments>~/Documents/Scripts/lingo/GetSetPrefs.ls</comments> 18 18 <memberName>GetSetPrefs</memberName> 19 <f Name>GetSetPrefs</fName>19 <fname>GetSetPrefs</fname> 20 20 </GetSetPrefs> 21 21 <aleXtrasMovieScript> … … 23 23 <comments>~/Documents/Scripts/lingo/aleXtrasMovieScript.ls</comments> 24 24 <memberName>aleXtrasMovieScript</memberName> 25 <f Name>aleXtrasMovieScript</fName>25 <fname>aleXtrasMovieScript</fname> 26 26 </aleXtrasMovieScript> 27 27 <PseudoXMLPS> … … 29 29 <comments>~/Documents/Scripts/lingo/PseudoXMLPS.ls</comments> 30 30 <memberName>PseudoXMLPS</memberName> 31 <f Name>PseudoXMLPS</fName>31 <fname>PseudoXMLPS</fname> 32 32 </PseudoXMLPS> 33 33 <simpleGoToAction> … … 35 35 <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/simpleGoToAction.ls</comments> 36 36 <memberName>simpleGoToAction</memberName> 37 <f Name>simpleGoToAction</fName>37 <fname>simpleGoToAction</fname> 38 38 </simpleGoToAction> 39 39 <SpriteNameBeaver> … … 41 41 <comments>~/Documents/Scripts/lingo/SpriteNameBeaver.ls</comments> 42 42 <memberName>SpriteNameBeaver</memberName> 43 <f Name>SpriteNameBeaver</fName>43 <fname>SpriteNameBeaver</fname> 44 44 </SpriteNameBeaver> 45 45 </Untitled>
Note: See TracChangeset
for help on using the changeset viewer.
