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

Changeset 93


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

various fixes in beta

Files:
9 edited

Legend:

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

    r90 r93  
    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 
  • 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 
  • trunk/lingosource/castlib1/alexUtilities.ls

    r88 r93  
    210210end 
    211211 
    212  
    213  
    214  
    215212-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    216213-- xxxxxxxxxxxxxxxxxx Write text out to a file 
     
    219216on mSaveTextToTempFile me, theText, pfad 
    220217   
    221   if ilk(pfad) <> #string then return 0 
    222   if length(pfad) < 1 then return 0 
     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 
    223224   
    224225  return mSaveToTextFile(me, theText, pfad) 
     
    406407-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    407408 
    408 on mGetFolderPathFromUser me 
     409on mGetFolderPathFromUser me, startFolder, theTitle, flags, instruction, offsx, offsy 
    409410  retval = "" 
    410411   
     
    419420    end if 
    420421     
    421     retval = baGetFolder( "", "Select a folder", 3, "", 50, 50 ) 
     422    startFolder = string(startFolder) 
     423    instruction = string(instruction) 
     424    flags = integer(flags) 
     425    if ilk(flags) <> #integer then flags = 0 
     426    theTitle = string(theTitle) 
     427     
     428    offsx = integer(offsx) 
     429    if ilk(offsx) <> #integer then offsx = -1 
     430     
     431    offsy = integer(offsy) 
     432    if ilk(offsy) <> #integer then offsy = -1 
     433     
     434    retval = baGetFolder(startFolder, theTitle, flags, instruction, offsx, offsy ) 
    422435     
    423436    if resetUNames = 1 then baReturnUnixNames(1) 
     
    23552368  if not(the platform contains "mac") then return fname 
    23562369   
     2370  if fname starts "/" then return fname -- huh? must already be an absolute unix path 
     2371   
    23572372  offs = offset(":", fname) 
    23582373  repeat while offs 
     
    23712386  if not(the platform contains "mac") then return fname 
    23722387   
     2388  if fname starts "/Volumes/" then 
     2389    olddelim = the itemdelimiter 
     2390    the itemdelimiter = "/" 
     2391    delete item 1 to 3 of fname 
     2392    the itemdelimiter = olddelim 
     2393    put "/" before fname 
     2394  end if 
     2395   
     2396  if not(fname starts "/") then return fname -- huh? doesn't seem to be an absolute unix path  
     2397   
    23732398  offs = offset("/", fname) 
    23742399  repeat while offs 
     
    23762401    offs = offset("/", fname) 
    23772402  end repeat 
     2403   
    23782404  osDir = getOsDirectory() 
    23792405  olddelim = the itemdelimiter 
  • trunk/lingosource/castlib1/bbedit_Utilities.ls

    r88 r93  
    510510     
    511511    -------- now write the results of the BBEdit diff back into the script members 
    512     memref1.scripttext = mGetTextFromTempFile(me, tempSrcHFSPath) 
     512    memref1.scripttext = mGetTextFromFile(me, tempSrcHFSPath) 
    513513     
    514514    if ilk(memref2) = #member then 
    515       memref2.scripttext = mGetTextFromTempFile(me, tempSrcHFSPath2) 
     515      memref2.scripttext = mGetTextFromFile(me, tempSrcHFSPath2) 
    516516    end if 
    517517     
     
    545545end 
    546546 
    547  
    548 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    549 -- xxxxxxxxxxxxxxxxxx Read text from file 
    550 --------------------- helper for the above bbdiff handler 
    551  
    552 on mGetTextFromTempFile me, pfad 
    553   retval = "" 
    554    
    555   if the runmode contains "Plugin" then return retval 
    556    
    557   fio = new(xtra "fileio") 
    558    
    559   if not objectP(fio) then return retval 
    560   if (voidP(pfad) or (pfad = "")) then return retval 
    561    
    562   if ilk(pfad) = #string then 
    563     if pfad.length > 0 then 
    564       fio.openFile(pfad, 1) 
    565       if fio.status() = 0 then 
    566         retval = fio.readFile() 
    567         fio.closeFile() 
    568       end if 
    569     end if 
    570   end if 
    571   fio = void 
    572    
    573   return retval 
    574    
    575 end 
    576547 
    577548 
  • trunk/lingosource/castlib1/svn_Utilities.ls

    r82 r93  
    138138           
    139139          if count(theResult) > 0 then 
    140             put "No differences found for member: " & memref.name && "(" & memref & ")" 
    141              
     140            if theResult[1] contains "no such file or directory" then 
     141              put theResult[1] 
     142            else 
     143              put "No differences found for member: " & memref.name && "(" & memref & ")" 
     144            end if 
    142145          else 
    143146             
    144147            -------- now write the results of the BBEdit diff back into the script members 
    145             scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 
     148            scrText = mGetTextFromFile(me, tempSrcHFSPath) 
    146149             
    147150             
     
    29632966   
    29642967  if chooseNewPath = 1 then 
    2965     workingFolder = baGetFolder(the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 
     2968    workingFolder = mGetFolderPathFromUser(me, the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 
    29662969  end if 
    29672970   
     
    29732976    alert selectMsg 
    29742977     
    2975     workingFolder = baGetFolder(the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 
     2978    workingFolder = mGetFolderPathFromUser(me, the moviepath, "Please select a working copy for SVN update", 3, "Select working copy", -2, -2) 
    29762979  end if 
    29772980   
Note: See TracChangeset for help on using the changeset viewer.