Changeset 90 for branches/beta/castlib1/bbedit_Utilities.ls
- Timestamp:
- 12/09/07 12:59:45 (4 years ago)
- File:
-
- 1 edited
-
branches/beta/castlib1/bbedit_Utilities.ls (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/castlib1/bbedit_Utilities.ls
r84 r90 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 Write text out to a file550 --------------------- helper for the above bbdiff handler551 552 on mSaveTextToTempFile me, theText, pfad553 554 retval = 0555 556 if ilk(theText) <> #string then return retval557 558 fio = new(xtra "fileio")559 if not objectP(fio) then return retval560 561 if ilk(pfad) = #string then562 if pfad.length > 0 then563 564 fio.openFile(pfad, 0)565 if fio.status() = 0 then fio.delete()566 567 fio.createFile(pfad)568 if fio.status() = 0 then569 570 fio.openFile(pfad, 2)571 if fio.status() = 0 then572 573 fio.writeString(theText)574 575 if fio.status() = 0 then retval = pfad576 577 fio.closeFile()578 end if579 end if580 end if581 end if582 583 fio = 0584 585 return retval586 end587 588 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx589 -- xxxxxxxxxxxxxxxxxx Read text from file590 --------------------- helper for the above bbdiff handler591 592 on mGetTextFromTempFile me, pfad593 retval = ""594 595 if the runmode contains "Plugin" then return retval596 597 fio = new(xtra "fileio")598 599 if not objectP(fio) then return retval600 if (voidP(pfad) or (pfad = "")) then return retval601 602 if ilk(pfad) = #string then603 if pfad.length > 0 then604 fio.openFile(pfad, 1)605 if fio.status() = 0 then606 retval = fio.readFile()607 fio.closeFile()608 end if609 end if610 end if611 fio = void612 613 return retval614 615 end616 547 617 548
Note: See TracChangeset
for help on using the changeset viewer.
