Changeset 90 for branches/beta/castlib1/alexUtilities.ls
- Timestamp:
- 12/09/07 12:59:45 (4 years ago)
- File:
-
- 1 edited
-
branches/beta/castlib1/alexUtilities.ls (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.
