FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error With SaveAsRtf()
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Error With SaveAsRtf()
Posted: Wed Feb 04, 2009 12:43 AM
hi,

When I execute " pdescricao: = oRich: SaveAsRTF () " the following error is occurring:

xb_free called with null to pointer

DEFINE DIALOG oDlg RESOURCE "SAC170IA"

    oRich := TRichEdit():Redefine( 103, { || "" }, oDlg )
    oRich:lHighLight = .f.
    oRich:SetText( pDescricao)

ACTIVATE DIALOG oDlg

pdescricao := oRich:SaveAsRTF()
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Error With SaveAsRtf()
Posted: Wed Feb 04, 2009 08:56 AM
Vilian,

I think you must use a filename

cFile := "Test.rtf"
pdescricao := oRich:SaveAsRTF(cFile)
kind regards

Stefan
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Error With SaveAsRtf()
Posted: Wed Feb 04, 2009 11:43 AM

Stefan,

Although to find that he is not correct I only tested its suggestion to confirm. The error persists!

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error With SaveAsRtf()
Posted: Wed Feb 04, 2009 01:04 PM

Vilian,

Please download this RICHEDIT.obj and link it as another OBJ of your application or replace it in FiveHC.lib:

http://www.mediafire.com/?sharekey=572e ... 0a1ae8665a

Method SaveAsRTF() returns a RTF string, that you can save, keep in a variable, etc.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Error With SaveAsRtf()
Posted: Wed Feb 04, 2009 05:32 PM

Antonio,

Thanks.

Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Error With SaveAsRtf()
Posted: Thu Feb 05, 2009 08:30 AM
vilian wrote:Stefan,

Although to find that he is not correct I only tested its suggestion to confirm. The error persists!


Oops, sorry, I mixed up SaveAsRTF() and SaveToRTFFile() :-)
kind regards

Stefan
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Error With SaveAsRtf()
Posted: Fri Feb 06, 2009 05:53 PM

>SaveAsRTF() and SaveToRTFFile()

I can't find these in either the FW or xHarbour help files. Do they belong to either FW or xHarbour or are they third-party functions?

What is the syntax for SaveToRTFFile()?

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error With SaveAsRtf()
Posted: Fri Feb 06, 2009 06:08 PM

James,

They are methods of Class TRichEdit

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Error With SaveAsRtf()
Posted: Fri Feb 06, 2009 06:37 PM

Antonio,

>They are methods of Class TRichEdit

Thanks. I should have figured that out!

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion