Lazarus

Programming => Packages and Libraries => RichMemo => Topic started by: WizardNo.7 on October 22, 2013, 04:32:59 pm

Title: Save with TRichMemo
Post by: WizardNo.7 on October 22, 2013, 04:32:59 pm
I've looked around and tried a number of algorithms, but I can't seem to figure out how to save a RTF file with the TRichMemo component?

Any and all help will be greatly appreciated!
Title: Re: Save with TRichMemo
Post by: typo on October 22, 2013, 04:38:49 pm
TlzRichEdit can save RTF files.

http://code.google.com/p/lazarus-br/downloads/detail?name=lzRichEdit.zip&can=2&q=
Title: Re: Save with TRichMemo
Post by: WizardNo.7 on October 22, 2013, 05:14:52 pm
Thanx Typo, I have in the past already downloaded a lzRichEdit package but it did not want to install no matter what I tried. I will try this one as soon as possible and come back to you. But I would be real glad if the TRichMemo's Save function can be made to work!

Edit: Same problem:

ERROR ->
Code: [Select]
gtk2extrah.inc(17,22) Fatal: Can not find gtk2ext used by Gtk2Extra, ppu=..\..\..\fpc\2.7.1\units\i386-win32\gtk2\gtk2ext.ppu
Even though the .ppu IS in that location!!!

What to do?
Title: Re: Save with TRichMemo
Post by: marcov on October 23, 2013, 10:33:38 am
Thanx Typo, I have in the past already downloaded a lzRichEdit package but it did not want to install no matter what I tried. I will try this one as soon as possible and come back to you. But I would be real glad if the TRichMemo's Save function can be made to work!

Edit: Same problem:

ERROR ->
Code: [Select]
C:\Users\Eduan\Downloads\lzRichEdit\lzRichEdit\interfaces\win32\win32wsrichbox.pas(161,15) Error: Illegal type conversion: "LongWord" to "TStream"

You are probably using 64-bit, and you can't store a 64-bits pointer (class reference like TStream) in a dword (pdword^). So the error is correct. The problem is thus not only in this routine, but also in the code that
calls this code (and loads dwcookie with a pointer, probably cutting off the top half of a pointer)

Easy solution: don't use 64-bit, hard solution: update code for 64-bit.

 
Title: Re: Save with TRichMemo
Post by: WizardNo.7 on October 23, 2013, 10:35:54 am
Am using 32-bit now, and had already updated my post.
Quote
ERROR ->
Code: [Select]

gtk2extrah.inc(17,22) Fatal: Can not find gtk2ext used by Gtk2Extra, ppu=..\..\..\fpc\2.7.1\units\i386-win32\gtk2\gtk2ext.ppu


Even though the .ppu IS in that location!!!

What to do?
Any help there maybe?  ;D

Thanks anyway!
Title: Re: Save with TRichMemo
Post by: marcov on October 23, 2013, 01:20:50 pm
1) Why are you using gtk on windows?
2) FPC sources should only be in the browse path, not in the unitpath.
Title: Re: Save with TRichMemo
Post by: WizardNo.7 on October 23, 2013, 01:27:01 pm
Quote
1) Why are you using gtk on windows?
2) FPC sources should only be in the browse path, not in the unitpath.

1) Lazarus and the components added it? I didn't...
2) Explain please?
Title: Re: Save with TRichMemo
Post by: WizardNo.7 on December 06, 2013, 01:47:12 pm
Bump ;) ;D
TinyPortal © 2005-2018