Page 1 of 1

Tscintilla save a file

Posted: Wed Nov 27, 2024 12:43 pm
by Silvio.Falconi
I saw If I made

oMemo:Save(,,,,,.t.)

save a file with this name "noname.prg"


How I can to save with a new name into a specific folder ?

I made

Code: Select all | Expand

Function Salva_File(oMemo)
   local  cFile := cGetFile32( , FWString("Save as"), 0, ;
                          hb_CurDrive() + ":\" + CurDir(), .T., .T. )
       oMemo:Save(cFile,,,,,.t.)
     return nil
but make error

Code: Select all | Expand

Error occurred at: 11/27/24, 13:55:19
   Error description: Error BASE/1066  Argument error: conditional
   Args:
     [   1] = C   C:\work\silvioscript\script\silvio.sls

Stack Calls
===========
   Called from: .\source\classes\scintila.prg => TSCINTILLA:SAVE( 1049 )
   Called from: test.prg => SALVA_FILE( 322 )
   Called from: test.prg => (b)SILVIOSCRIPT( 48 )

Re: Tscintilla save a file

Posted: Wed Nov 27, 2024 4:08 pm
by alerchster

Code: Select all | Expand

function Salva_File(oMemo)
   local  cFile := cGetFile32( , FWString("Save as"), 0, ;
                          hb_CurDrive() + ":\" + CurDir(), .T., .T. )
   MemoWrit(cFile, oMemo:cTitle )
 
return nil

Re: Tscintilla save a file

Posted: Thu Nov 28, 2024 11:04 am
by Silvio.Falconi
alerchster wrote:

Code: Select all | Expand

function Salva_File(oMemo)
   local  cFile := cGetFile32( , FWString("Save as"), 0, ;
                          hb_CurDrive() + ":\" + CurDir(), .T., .T. )
   MemoWrit(cFile, oMemo:cTitle )
 
return nil
yes of course but I saw there was a method into Tscintilla I thinked to use this .....