Error With SaveAsRtf()

Error With SaveAsRtf()

Postby vilian » 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

Code: Select all  Expand view
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
User avatar
vilian
 
Posts: 962
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Error With SaveAsRtf()

Postby StefanHaupt » Wed Feb 04, 2009 8:56 am

Vilian,

I think you must use a filename

Code: Select all  Expand view
cFile := "Test.rtf"
pdescricao := oRich:SaveAsRTF(cFile)
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Error With SaveAsRtf()

Postby vilian » 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
User avatar
vilian
 
Posts: 962
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Error With SaveAsRtf()

Postby Antonio Linares » Wed Feb 04, 2009 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41928
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error With SaveAsRtf()

Postby vilian » Wed Feb 04, 2009 5:32 pm

Antonio,

Thanks.
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 962
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Error With SaveAsRtf()

Postby StefanHaupt » Thu Feb 05, 2009 8: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() :oops:
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Error With SaveAsRtf()

Postby James Bott » Fri Feb 06, 2009 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Error With SaveAsRtf()

Postby Antonio Linares » Fri Feb 06, 2009 6:08 pm

James,

They are methods of Class TRichEdit
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41928
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error With SaveAsRtf()

Postby James Bott » Fri Feb 06, 2009 6:37 pm

Antonio,

>They are methods of Class TRichEdit

Thanks. I should have figured that out!

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: karinha and 33 guests

cron