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

Ignore:
Timestamp:
12/09/07 15:55:41 (4 years ago)
Author:
alex
Message:

various fixes in beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/beta/castlib1/alexUtilities.ls

    r92 r93  
    876876 
    877877on mDeleteMembersByName me, praefix 
     878   
     879  searchParams = mProcessSearchString(me, praefix) 
     880  searchString = searchParams.getaprop(#searchString) 
     881   
    878882  repeat with n = 1 to the number of castlibs 
    879883    repeat with z = 1 to the number of members of castlib n 
    880       if member(z, n).name starts praefix then 
    881         member(z, n).erase() 
    882       end if 
     884       
     885      case searchParams.getaprop(#searchMode) of 
     886           
     887        #startsWith: 
     888          if member(z, n).name starts searchString then 
     889            member(z, n).erase() 
     890          end if 
     891           
     892        #endsWith: 
     893          theName = member(z, n).name 
     894          len = length(theName) 
     895          startchar = len - length(searchString) + 1 
     896          if theName.char[startchar .. len] = searchString then 
     897            member(z, n).erase() 
     898          end if 
     899           
     900        #equals: 
     901          if member(z, n).name = searchString then 
     902            member(z, n).erase() 
     903          end if 
     904           
     905        otherwise: 
     906          if member(z, n).name contains searchString then 
     907            member(z, n).erase() 
     908          end if 
     909           
     910      end case 
     911       
    883912    end repeat 
    884913  end repeat 
    885914end 
    886915 
     916-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     917 
     918on mProcessSearchString me, srchString 
     919   
     920  searchmode = #contains 
     921   
     922  if char 1 of srchString = "^" then 
     923    if the last char of srchString <> "$" then 
     924      searchmode = #startsWith 
     925    else 
     926      searchmode = #equals 
     927      delete the last char of srchString 
     928    end if 
     929    delete char 1 of srchString 
     930  else 
     931    if the last char of srchString = "$" then 
     932      searchmode = #endsWith 
     933      delete the last char of srchString 
     934    end if 
     935  end if 
     936   
     937  return [#searchString:srchString, #searchMode:searchmode] 
     938end 
    887939 
    888940 
     
    10081060 
    10091061on mSelectInScore me, startfr, endfr 
     1062   
     1063   
     1064  ------------------------------ 
     1065  -- this allows to enter anything other than an integer or an integer < 1 in order to search all frames 
     1066  if not(voidP(startfr)) then 
     1067    startfr = integer(startfr) 
     1068    if voidP(startfr) then 
     1069      startfr = 1 
     1070      endfr = 0 
     1071    end if 
     1072    if startfr < 1 then 
     1073      startfr = 1 
     1074      endfr = 0 
     1075    end if 
     1076  end if 
     1077  ------------------------------ 
    10101078   
    10111079  cl = the activecastlib 
     
    15141582   
    15151583  created = 0 
     1584   
     1585  if mCheckForXtra(me, "BudAPI") then 
     1586    theResult = baMsgBox("Create new index ?", "New index", "Yesno", "Question", 1) 
     1587    if theResult = "Yes" then 
     1588      theResult = baPrompt("Enter new title", "Enter new title", "New index", 0, -2, -2) 
     1589      if length(theResult) then 
     1590        tell helpwindow to mCreateIndexMember theResult 
     1591      end if 
     1592    end if 
     1593  end if 
    15161594   
    15171595  repeat with n = 1 to anz 
Note: See TracChangeset for help on using the changeset viewer.