Tscintilla save a file

Post Reply
User avatar
Silvio.Falconi
Posts: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Tscintilla save a file

Post 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 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
alerchster
Posts: 95
Joined: Mon Oct 22, 2012 4:43 pm

Re: Tscintilla save a file

Post 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
Regards

Ing. Anton Lerchster
User avatar
Silvio.Falconi
Posts: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Re: Tscintilla save a file

Post 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 .....
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply