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

Ignore:
Timestamp:
12/09/07 12:59:45 (4 years ago)
Author:
alex
Message:

fixed bugs in beta

File:
1 edited

Legend:

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

    r87 r90  
    208208   
    209209  return retval 
     210end 
     211 
     212-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
     213-- xxxxxxxxxxxxxxxxxx Write text out to a file 
     214--------------------- helper for the bbdiff and svn handler 
     215 
     216on 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   
    210227end 
    211228 
     
    847864 
    848865on mDeleteMembersByName me, praefix 
    849    
    850   searchParams = mProcessSearchString(me, praefix) 
    851   searchString = searchParams.getaprop(#searchString) 
    852    
    853866  repeat with n = 1 to the number of castlibs 
    854867    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 
    883871    end repeat 
    884872  end repeat 
    885873end 
    886874 
    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 
    910875 
    911876 
     
    1031996 
    1032997on 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   ------------------------------ 
    1049998   
    1050999  cl = the activecastlib 
     
    15531502   
    15541503  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 
    15651504   
    15661505  repeat with n = 1 to anz 
Note: See TracChangeset for help on using the changeset viewer.