Changeset 93 for trunk/lingosource
- Timestamp:
- 12/09/07 15:55:41 (4 years ago)
- Location:
- trunk/lingosource/castlib1
- Files:
-
- 3 edited
-
alexUtilities.ls (modified) (7 diffs)
-
bbedit_Utilities.ls (modified) (2 diffs)
-
svn_Utilities.ls (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/alexUtilities.ls
r88 r93 210 210 end 211 211 212 213 214 215 212 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 216 213 -- xxxxxxxxxxxxxxxxxx Write text out to a file … … 219 216 on mSaveTextToTempFile me, theText, pfad 220 217 221 if ilk(pfad) <> #string then return 0 222 if length(pfad) < 1 then return 0 218 if ilk(pfad) <> #string then 219 pfad = mConvertUnix2HFS("/tmp/tmpfile.txt") 220 end if 221 if length(pfad) < 1 then 222 pfad = mConvertUnix2HFS("/tmp/tmpfile.txt") 223 end if 223 224 224 225 return mSaveToTextFile(me, theText, pfad) … … 406 407 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 407 408 408 on mGetFolderPathFromUser me 409 on mGetFolderPathFromUser me, startFolder, theTitle, flags, instruction, offsx, offsy 409 410 retval = "" 410 411 … … 419 420 end if 420 421 421 retval = baGetFolder( "", "Select a folder", 3, "", 50, 50 ) 422 startFolder = string(startFolder) 423 instruction = string(instruction) 424 flags = integer(flags) 425 if ilk(flags) <> #integer then flags = 0 426 theTitle = string(theTitle) 427 428 offsx = integer(offsx) 429 if ilk(offsx) <> #integer then offsx = -1 430 431 offsy = integer(offsy) 432 if ilk(offsy) <> #integer then offsy = -1 433 434 retval = baGetFolder(startFolder, theTitle, flags, instruction, offsx, offsy ) 422 435 423 436 if resetUNames = 1 then baReturnUnixNames(1) … … 2355 2368 if not(the platform contains "mac") then return fname 2356 2369 2370 if fname starts "/" then return fname -- huh? must already be an absolute unix path 2371 2357 2372 offs = offset(":", fname) 2358 2373 repeat while offs … … 2371 2386 if not(the platform contains "mac") then return fname 2372 2387 2388 if fname starts "/Volumes/" then 2389 olddelim = the itemdelimiter 2390 the itemdelimiter = "/" 2391 delete item 1 to 3 of fname 2392 the itemdelimiter = olddelim 2393 put "/" before fname 2394 end if 2395 2396 if not(fname starts "/") then return fname -- huh? doesn't seem to be an absolute unix path 2397 2373 2398 offs = offset("/", fname) 2374 2399 repeat while offs … … 2376 2401 offs = offset("/", fname) 2377 2402 end repeat 2403 2378 2404 osDir = getOsDirectory() 2379 2405 olddelim = the itemdelimiter -
trunk/lingosource/castlib1/bbedit_Utilities.ls
r88 r93 510 510 511 511 -------- now write the results of the BBEdit diff back into the script members 512 memref1.scripttext = mGetTextFrom TempFile(me, tempSrcHFSPath)512 memref1.scripttext = mGetTextFromFile(me, tempSrcHFSPath) 513 513 514 514 if ilk(memref2) = #member then 515 memref2.scripttext = mGetTextFrom TempFile(me, tempSrcHFSPath2)515 memref2.scripttext = mGetTextFromFile(me, tempSrcHFSPath2) 516 516 end if 517 517 … … 545 545 end 546 546 547 548 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx549 -- xxxxxxxxxxxxxxxxxx Read text from file550 --------------------- helper for the above bbdiff handler551 552 on mGetTextFromTempFile me, pfad553 retval = ""554 555 if the runmode contains "Plugin" then return retval556 557 fio = new(xtra "fileio")558 559 if not objectP(fio) then return retval560 if (voidP(pfad) or (pfad = "")) then return retval561 562 if ilk(pfad) = #string then563 if pfad.length > 0 then564 fio.openFile(pfad, 1)565 if fio.status() = 0 then566 retval = fio.readFile()567 fio.closeFile()568 end if569 end if570 end if571 fio = void572 573 return retval574 575 end576 547 577 548 -
trunk/lingosource/castlib1/svn_Utilities.ls
r82 r93 138 138 139 139 if count(theResult) > 0 then 140 put "No differences found for member: " & memref.name && "(" & memref & ")" 141 140 if theResult[1] contains "no such file or directory" then 141 put theResult[1] 142 else 143 put "No differences found for member: " & memref.name && "(" & memref & ")" 144 end if 142 145 else 143 146 144 147 -------- now write the results of the BBEdit diff back into the script members 145 scrText = mGetTextFrom TempFile(me, tempSrcHFSPath)148 scrText = mGetTextFromFile(me, tempSrcHFSPath) 146 149 147 150 … … 2963 2966 2964 2967 if chooseNewPath = 1 then 2965 workingFolder = baGetFolder(the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2)2968 workingFolder = mGetFolderPathFromUser(me, the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 2966 2969 end if 2967 2970 … … 2973 2976 alert selectMsg 2974 2977 2975 workingFolder = baGetFolder(the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2)2978 workingFolder = mGetFolderPathFromUser(me, the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 2976 2979 end if 2977 2980
Note: See TracChangeset
for help on using the changeset viewer.
