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/bbedit_Utilities.ls

    r84 r90  
    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 Write text out to a file 
    550 --------------------- helper for the above bbdiff handler 
    551  
    552 on mSaveTextToTempFile me, theText, pfad 
    553    
    554   retval = 0 
    555    
    556   if ilk(theText) <> #string then return retval 
    557    
    558   fio = new(xtra "fileio") 
    559   if not objectP(fio) then return retval 
    560    
    561   if ilk(pfad) = #string then 
    562     if pfad.length > 0 then 
    563        
    564       fio.openFile(pfad, 0) 
    565       if fio.status() = 0 then fio.delete() 
    566        
    567       fio.createFile(pfad) 
    568       if fio.status() = 0 then 
    569          
    570         fio.openFile(pfad, 2) 
    571         if fio.status() = 0 then 
    572            
    573           fio.writeString(theText) 
    574            
    575           if fio.status() = 0 then retval = pfad 
    576            
    577           fio.closeFile() 
    578         end if 
    579       end if 
    580     end if 
    581   end if 
    582    
    583   fio = 0 
    584    
    585   return retval 
    586 end 
    587  
    588 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    589 -- xxxxxxxxxxxxxxxxxx Read text from file 
    590 --------------------- helper for the above bbdiff handler 
    591  
    592 on mGetTextFromTempFile me, pfad 
    593   retval = "" 
    594    
    595   if the runmode contains "Plugin" then return retval 
    596    
    597   fio = new(xtra "fileio") 
    598    
    599   if not objectP(fio) then return retval 
    600   if (voidP(pfad) or (pfad = "")) then return retval 
    601    
    602   if ilk(pfad) = #string then 
    603     if pfad.length > 0 then 
    604       fio.openFile(pfad, 1) 
    605       if fio.status() = 0 then 
    606         retval = fio.readFile() 
    607         fio.closeFile() 
    608       end if 
    609     end if 
    610   end if 
    611   fio = void 
    612    
    613   return retval 
    614    
    615 end 
    616547 
    617548 
Note: See TracChangeset for help on using the changeset viewer.