Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Changeset 85 for trunk/lingosource


Ignore:
Timestamp:
12/09/07 12:36:31 (4 years ago)
Author:
alex
Message:

changed the selctinscore handler and the makehelp entries handler

Location:
trunk/lingosource/castlib1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib1/OSCmenu_Utilities.ls

    r82 r85  
    362362     
    363363    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"]) 
    365365    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"]) 
    367367     
    368368  end if 
  • trunk/lingosource/castlib1/alexUtilities.ls

    r82 r85  
    847847 
    848848on mDeleteMembersByName me, praefix 
     849   
     850  searchParams = mProcessSearchString(me, praefix) 
     851  searchString = searchParams.getaprop(#searchString) 
     852   
    849853  repeat with n = 1 to the number of castlibs 
    850854    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       
    854883    end repeat 
    855884  end repeat 
    856885end 
    857886 
     887-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     888 
     889on 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] 
     909end 
    858910 
    859911 
     
    9791031 
    9801032on 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  ------------------------------ 
    9811049   
    9821050  cl = the activecastlib 
     
    14851553   
    14861554  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 
    14871565   
    14881566  repeat with n = 1 to anz 
     
    22592337on mConvertHFS2Unix me, fname 
    22602338   
    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 
    22642344    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 
    22732347   
    22742348  return fname 
     
    22792353 
    22802354on 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 
    22842360    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 
    22972367   
    22982368  return fname 
Note: See TracChangeset for help on using the changeset viewer.