Changeset 85 for trunk/lingosource
- Timestamp:
- 12/09/07 12:36:31 (4 years ago)
- Location:
- trunk/lingosource/castlib1
- Files:
-
- 2 edited
-
OSCmenu_Utilities.ls (modified) (1 diff)
-
alexUtilities.ls (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r82 r85 362 362 363 363 subli.add("Convert path from HFS to UNIX") 364 pLookUpCommandList.setaprop("Convert path from HFS to UNIX", ["mConvertHFS2Unix me ", "alexUtilities"])364 pLookUpCommandList.setaprop("Convert path from HFS to UNIX", ["mConvertHFS2Unix me, string_HFSPath", "alexUtilities"]) 365 365 subli.add("Convert path from UNIX to HFS") 366 pLookUpCommandList.setaprop("Convert path from UNIX to HFS", ["mConvertUnix2HFS me ", "alexUtilities"])366 pLookUpCommandList.setaprop("Convert path from UNIX to HFS", ["mConvertUnix2HFS me, string_UnixPath", "alexUtilities"]) 367 367 368 368 end if -
trunk/lingosource/castlib1/alexUtilities.ls
r82 r85 847 847 848 848 on mDeleteMembersByName me, praefix 849 850 searchParams = mProcessSearchString(me, praefix) 851 searchString = searchParams.getaprop(#searchString) 852 849 853 repeat with n = 1 to the number of castlibs 850 854 repeat with z = 1 to the number of members of castlib n 851 if member(z, n).name starts praefix then 852 member(z, n).erase() 853 end if 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 854 883 end repeat 855 884 end repeat 856 885 end 857 886 887 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 888 889 on mProcessSearchString me, srchString 890 891 searchmode = #contains 892 893 if char 1 of srchString = "^" then 894 if the last char of srchString <> "$" then 895 searchmode = #startsWith 896 else 897 searchmode = #equals 898 delete the last char of srchString 899 end if 900 delete char 1 of srchString 901 else 902 if the last char of srchString = "$" then 903 searchmode = #endsWith 904 delete the last char of srchString 905 end if 906 end if 907 908 return [#searchString:srchString, #searchMode:searchmode] 909 end 858 910 859 911 … … 979 1031 980 1032 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 frames 1037 if not(voidP(startfr)) then 1038 startfr = integer(startfr) 1039 if voidP(startfr) then 1040 startfr = 1 1041 endfr = 0 1042 end if 1043 if startfr < 1 then 1044 startfr = 1 1045 endfr = 0 1046 end if 1047 end if 1048 ------------------------------ 981 1049 982 1050 cl = the activecastlib … … 1485 1553 1486 1554 created = 0 1555 1556 if mCheckForXtra(me, "BudAPI") then 1557 theResult = baMsgBox("Create new index ?", "New index", "Yesno", "Question", 1) 1558 if theResult = "Yes" then 1559 theResult = baPrompt("Enter new title", "Enter new title", "New index", 0, -2, -2) 1560 if length(theResult) then 1561 tell helpwindow to mCreateIndexMember theResult 1562 end if 1563 end if 1564 end if 1487 1565 1488 1566 repeat with n = 1 to anz … … 2259 2337 on mConvertHFS2Unix me, fname 2260 2338 2261 if not(the platform) contains "mac" then return fname 2262 2263 if mCheckForXtra(me, "budapi") = 0 then 2339 if not(the platform contains "mac") then return fname 2340 2341 offs = offset(":", fname) 2342 repeat while offs 2343 put "/" into char offs of fname 2264 2344 offs = offset(":", fname) 2265 repeat while offs 2266 put "/" into char offs of fname 2267 offs = offset(":", fname) 2268 end repeat 2269 put "/Volumes/" before fname 2270 else 2271 return baUnixName(fname) 2272 end if 2345 end repeat 2346 put "/Volumes/" before fname 2273 2347 2274 2348 return fname … … 2279 2353 2280 2354 on mConvertUnix2Hfs me, fname 2281 if not(the platform) contains "mac" then return fname 2282 2283 if mCheckForXtra(me, "budapi") = 0 then 2355 if not(the platform contains "mac") then return fname 2356 2357 offs = offset("/", fname) 2358 repeat while offs 2359 put ":" into char offs of fname 2284 2360 offs = offset("/", fname) 2285 repeat while offs 2286 put ":" into char offs of fname 2287 offs = offset("/", fname) 2288 end repeat 2289 osDir = getOsDirectory() 2290 olddelim = the itemdelimiter 2291 the itemdelimiter = ":" 2292 put item 1 of osDir before fname 2293 the itemdelimiter = olddelim 2294 else 2295 return baHFSName(fname) 2296 end if 2361 end repeat 2362 osDir = getOsDirectory() 2363 olddelim = the itemdelimiter 2364 the itemdelimiter = ":" 2365 put item 1 of osDir before fname 2366 the itemdelimiter = olddelim 2297 2367 2298 2368 return fname
Note: See TracChangeset
for help on using the changeset viewer.
