- Timestamp:
- 12/09/07 12:59:45 (4 years ago)
- Location:
- branches/beta
- Files:
-
- 1 deleted
- 6 edited
-
HandlerMenu_OSC.dcr (modified) (previous)
-
HandlerMenu_OSC.dir (modified) (previous)
-
castlib1/OSCmenu_Utilities.ls (modified) (1 diff)
-
castlib1/alexUtilities.ls (modified) (4 diffs)
-
castlib1/bbdiff.ls (deleted)
-
castlib1/bbedit_Utilities.ls (modified) (2 diffs)
-
castlib1/svn_Utilities.ls (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/castlib1/OSCmenu_Utilities.ls
r87 r90 362 362 363 363 subli.add("Convert path from HFS to UNIX") 364 pLookUpCommandList.setaprop("Convert path from HFS to UNIX", ["mConvertHFS2Unix me , string_HFSPath", "alexUtilities"])364 pLookUpCommandList.setaprop("Convert path from HFS to UNIX", ["mConvertHFS2Unix me", "alexUtilities"]) 365 365 subli.add("Convert path from UNIX to HFS") 366 pLookUpCommandList.setaprop("Convert path from UNIX to HFS", ["mConvertUnix2HFS me , string_UnixPath", "alexUtilities"])366 pLookUpCommandList.setaprop("Convert path from UNIX to HFS", ["mConvertUnix2HFS me", "alexUtilities"]) 367 367 368 368 end if -
branches/beta/castlib1/alexUtilities.ls
r87 r90 208 208 209 209 return retval 210 end 211 212 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 213 -- xxxxxxxxxxxxxxxxxx Write text out to a file 214 --------------------- helper for the bbdiff and svn handler 215 216 on mSaveTextToTempFile me, theText, pfad 217 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 224 225 return mSaveToTextFile(me, theText, pfad) 226 210 227 end 211 228 … … 847 864 848 865 on mDeleteMembersByName me, praefix 849 850 searchParams = mProcessSearchString(me, praefix)851 searchString = searchParams.getaprop(#searchString)852 853 866 repeat with n = 1 to the number of castlibs 854 867 repeat with z = 1 to the number of members of castlib n 855 856 case searchParams.getaprop(#searchMode) of 857 858 #startsWith: 859 if member(z, n).name starts searchString then 860 member(z, n).erase() 861 end if 862 863 #endsWith: 864 theName = member(z, n).name 865 len = length(theName) 866 startchar = len - length(searchString) + 1 867 if theName.char[startchar .. len] = searchString then 868 member(z, n).erase() 869 end if 870 871 #equals: 872 if member(z, n).name = searchString then 873 member(z, n).erase() 874 end if 875 876 otherwise: 877 if member(z, n).name contains searchString then 878 member(z, n).erase() 879 end if 880 881 end case 882 868 if member(z, n).name starts praefix then 869 member(z, n).erase() 870 end if 883 871 end repeat 884 872 end repeat 885 873 end 886 874 887 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx888 889 on mProcessSearchString me, srchString890 891 searchmode = #contains892 893 if char 1 of srchString = "^" then894 if the last char of srchString <> "$" then895 searchmode = #startsWith896 else897 searchmode = #equals898 delete the last char of srchString899 end if900 delete char 1 of srchString901 else902 if the last char of srchString = "$" then903 searchmode = #endsWith904 delete the last char of srchString905 end if906 end if907 908 return [#searchString:srchString, #searchMode:searchmode]909 end910 875 911 876 … … 1031 996 1032 997 on mSelectInScore me, startfr, endfr 1033 1034 1035 ------------------------------1036 -- this allows to enter anything other than an integer or an integer < 1 in order to search all frames1037 if not(voidP(startfr)) then1038 startfr = integer(startfr)1039 if voidP(startfr) then1040 startfr = 11041 endfr = 01042 end if1043 if startfr < 1 then1044 startfr = 11045 endfr = 01046 end if1047 end if1048 ------------------------------1049 998 1050 999 cl = the activecastlib … … 1553 1502 1554 1503 created = 0 1555 1556 if mCheckForXtra(me, "BudAPI") then1557 theResult = baMsgBox("Create new index ?", "New index", "Yesno", "Question", 1)1558 if theResult = "Yes" then1559 theResult = baPrompt("Enter new title", "Enter new title", "New index", 0, -2, -2)1560 if length(theResult) then1561 tell helpwindow to mCreateIndexMember theResult1562 end if1563 end if1564 end if1565 1504 1566 1505 repeat with n = 1 to anz -
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 -
branches/beta/castlib1/svn_Utilities.ls
r84 r90 143 143 144 144 -------- now write the results of the BBEdit diff back into the script members 145 scrText = mGetTextFrom TempFile(me, tempSrcHFSPath)145 scrText = mGetTextFromFile(me, tempSrcHFSPath) 146 146 147 147
Note: See TracChangeset
for help on using the changeset viewer.
