Richmemo lazarus / 31-LCL ---------------------------------------------------------------------- MoellerCLaus · 2014-12-16 19:00 On my way to converting my application (3.234.129 lines) from Delphi to Lararus: Richmemo: From the official sites it is a version from 2009? From the SVN I get from 4 days ago; which doesn't compile / link. Anyone having a link to a "in between" version? Indy: There is a download at fulgan. Latest stable version to be found where? I love to work with Lazarus. 10 years with Delphi; it's a steap curve learning helping yourself. Bur I like Lazarus / FPC it's smart and intelligent! ---------------------------------------------------------------------- Michl · 2014-12-16 21:21 Quote from: MoellerCLaus on December 16, 2014, 08:00:02 pmFrom the SVN I get from 4 days ago; which doesn't compileI've just tested the SVN version https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus- ccr/components/richmemo from Wiki. Here it compiles and its useable (Lazarus 1.3 r47207M FPC 2.6.4 i386-win32-win32/win64). What is your OS and Lazarus version? ---------------------------------------------------------------------- typo · 2014-12-16 21:35 Try lzRichEdit, it compiles. http://wiki.lazarus.freepascal.org/lzRichEdit If you are a Windows user, you will have a good surprise. And if you are a Linux user, please help on development. ---------------------------------------------------------------------- skalogryz · 2014-12-17 01:28 What is the error message you are getting on compilation? ---------------------------------------------------------------------- MoellerCLaus · 2014-12-17 18:02 First of all thanks that you care! Quotertfeditpropdialog.pas(139,52) Hint: Local variable "f" does not seem to be initialized rtfeditpropdialog.pas(157,52) Hint: Local variable "f" does not seem to be initialized rtfeditpropdialog.pas(171,52) Hint: Local variable "f" does not seem to be initialized PPU Loading C:\Lazarus_ekstra\richmemo\lib\i386-win32\richmemoregister.ppu PPU Source: richmemoregister.pas not found PPU Source: richmemopackage.lrs not found Recompiling richmemoregister, checksum changed for RtfEditPropDialog richmemopackage.pas(10,20) Fatal: Can not find unit richmemoregister used by richmemopackage. Check search path package richmemopackage, try a clean rebuild, check implementation uses sections.. My application is just a button and a richmemo! Changes in search paths is a way through but probably not what the composer want us to! ---------------------------------------------------------------------- skalogryz · 2014-12-17 18:37 hmm... are you getting the error when you compile the project and when you compile Lazarus? Do you have richmemo installed into Lazarus? I'd think you should. And if yes, then richmemo units should not be part of your search path at all. Since they would be appended automatically by Lazarus. You also need to open your project location path. Find "lib\i386-win32" folder there and wipe all .o and .ppu files out of it. Otherwise they'll keep conflicting with "lib" of richmemo package. ---------------------------------------------------------------------- MoellerCLaus · 2014-12-17 18:58 I deleted in *.o anmd *.ppu's QuoteHint: Start of reading config file C:\lazarus\fpc\2.6.4\bin\i386-win32\fpc.cfg Hint: End of reading config file C:\lazarus\fpc\2.6.4\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.6.4 [2014/10/11] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling richmemopackage.pas Compiling richmemofactory.pas Compiling richmemo.pas Compiling wsrichmemo.pas C:\Lazarus_ekstra\richmemo\wsrichmemo.pas(28,23) Hint: Unit "StdCtrls" not used in WSRichMemo Compiling .\win32\win32richmemo.pas Compiling .\win32\win32richmemoproc.pas Compiling richmemoutils.pas C:\Lazarus_ekstra\richmemo\richmemoutils.pas(75,3) Note: Local variable "sel" not used C:\Lazarus_ekstra\richmemo\richmemoutils.pas(88,3) Note: Local variable "sel" not used C:\Lazarus_ekstra\richmemo\win32\win32richmemoproc.pas(649,3) Note: Local variable "txtlen" is assigned but never used Compiling richmemoregister.pas Compiling .\ide\rtfeditpropdialog.pas Compiling richmemortf.pas Compiling rtfparspre211.pas Compiling richmemohelpers.pas C:\Lazarus_ekstra\richmemo\richmemohelpers.pas(25,13) Hint: Unit "strutils" not used in RichMemoHelpers richmemopackage.pas(10,3) Hint: Unit "RichMemoFactory" not used in richmemopackage richmemopackage.pas(11,3) Hint: Unit "RichMemoHelpers" not used in richmemopackage richmemopackage.pas(11,20) Hint: Unit "RTFParsPre211" not used in richmemopackage richmemopackage.pas(11,35) Hint: Unit "RtfEditPropDialog" not used in richmemopackage 5834 lines compiled, 1.4 sec 8 hint(s) issued 3 note(s) issued "Compiling package richmemopackage 1.0" completed Hint: Start of reading config file C:\lazarus\fpc\2.6.4\bin\i386-win32\fpc.cfg Hint: End of reading config file C:\lazarus\fpc\2.6.4\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.6.4 [2014/10/11] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling project1.lpr PPU Loading C:\Lazarus_ekstra\richmemo\lib\i386-win32\richmemoregister.ppu PPU Source: richmemoregister.pas not found PPU Source: richmemopackage.lrs not found Recompiling richmemoregister, checksum changed for RtfEditPropDialog richmemopackage.pas(10,20) Fatal: Can not find unit richmemoregister used by richmemopackage. Check search path package richmemopackage, try a clean rebuild, check implementation uses sections.. Richmemo is installed and compiled with Lazarus. I am on Win7. Simple project as described and the above is the result. Could it be the way I download the SVN? ---------------------------------------------------------------------- skalogryz · 2014-12-17 19:18 could you please archive and post the project here? The problem I see - is that your project trying to compile richmemo sources. It shouldn't , because sources are compiled during "installation" to the Lazarus. ---------------------------------------------------------------------- MoellerCLaus · 2014-12-17 19:53 You are right. When making a new project in a new directory; it works fine. Putting a Richmemo in my mainform in my project; looking to the source file; it adds the richmemopackage in the uses clause. I have had several attempts to install it. How to reset it and start all over? ---------------------------------------------------------------------- MoellerCLaus · 2014-12-17 19:57 I am still not sure I install correctly from the SVN repository. Maybe it is not richmemo but my ability to download/install from SVN? Can I read somwhere how to do? ---------------------------------------------------------------------- skalogryz · 2014-12-17 19:59 I'm not sure, if it has anything to do with SVN, but you can do the following. Revert all the changes made at richmemo package. (if you're using tortoise SVN you can just right click on it and hit select "svn revert") Then - uninstall the package from Lazarus and recompile the IDE. After that - install it richmemo again, recompiling IDE. Once done, create a new project and drop RichMemo on the form. The only unit that should be added to "uses" section is "RichMemo" and not "RichMemoPackage" ---------------------------------------------------------------------- skalogryz · 2014-12-17 20:28 But looking at the other problems that you've. I'd think, something is messed-up with your Lazarus configuration. Problems look similar to me. ---------------------------------------------------------------------- typo · 2014-12-18 06:41 Congratulations, Richmemo users. And for the developer too, of course. ---------------------------------------------------------------------- MoellerCLaus · 2014-12-19 15:36 Solved and completely my own mistake. I wanted to make an editor based on RichMemo. So I copied the /ide/RTFDialog. After deleting these files. Installing Tortouise with link to richmemo from lazarus thrunk. It works Thanks ---------------------------------------------------------------------- skalogryz · 2014-12-19 15:58 Quote from: MoellerCLaus on December 19, 2014, 04:36:42 pmI wanted to make an editor based on RichMemo. So I copied the /ide/RTFDialog. After deleting these files. Installing Tortouise with link to richmemo from lazarus thrunk. It works you could copy the file, but you'd need to change the name. I'm glad it works for you. @ typo: thank you! ---------------------------------------------------------------------- typo · 2014-12-19 16:49 Maybe we can merge the 2 projects, RichMemo and lzRichEdit. Consider this. ---------------------------------------------------------------------- skalogryz · 2014-12-19 17:09 Sure, but only, if agreement on API is reached. I'm very careful about creating APIs.. that's why Print() is not in RichMemo yet. As well as some of the methods (i.e. paragraph numbering) is not officially "released" (even though available for win32) I found my way out of not being compatible with delphi RichEdit, by using helpers. I don't see the component's API as reflection of WinAPI. Just like you noted - WinAPI might be a bit hostile to a developer ---------------------------------------------------------------------- typo · 2014-12-19 17:37 What is wrong about Print method? It works quite well in Windows. I think it will be difficult to you making something different from that. ---------------------------------------------------------------------- skalogryz · 2014-12-19 17:53 Quote from: typo on December 19, 2014, 06:37:38 pmWhat is wrong about Print method? It works quite well in Windows. I think it will be difficult to you making something different from that. well... There's RichEdit delphi method Print. Code: [Select]procedure TRichEdit.Print(const caption: string);...and people were complaining about not being able to setup margins. I believe that's why lzRichEdit finished with Code: [Select]procedure Print(const DocumentTitle: string; Margins :TMargins) I believe, that giving an option just for margins is still not enough, and the method should be something like this. Code: [Select]procedure Print(const PrintOptions: TPrintOptions) where TPrintOptions looks like this: Code: [Select]  TPrintOptions = record     caption : String;     margins : TMargins;     pages   : array of TPageRange;     pagesCount : integer;     target : TCanvas; // for preview printing     targetRect : TRect; // for preview reszing     ... something else? + any future extension of printing could be consumed.   end; With that method, a backward (delphi) compatible method can be easily implemented. ---------------------------------------------------------------------- skalogryz · 2014-12-19 18:19 I'm currently preparing cross-platform apis for low-cost images insertion. See a demo at youtube ---------------------------------------------------------------------- typo · 2014-12-19 18:25 Good. Chat apps will like this. ---------------------------------------------------------------------- typo · 2014-12-20 11:21 Quote from: skalogryz on December 19, 2014, 06:09:55 pmI found my way out of not being compatible with delphi RichEdit, by using helpers. I think it can be a problem because lzRichEdit is entirely compatible with Delpihi, according to general guidelines of Lazarus. ---------------------------------------------------------------------- skalogryz · 2014-12-20 13:15 yes, being Delphi compatible is certainly a plus. Which is more of a burden for me than a benefit. A thus, It has never been a priority for RichMemo. Instead a cross- platform functionality. But I'm glad I was able to get avoid sub- classing. ---------------------------------------------------------------------- typo · 2014-12-20 14:45 The lack of a RichEdit in Lazarus is a great problem for converting projects from Delphi. Workarounds go from TMemo to IpHtmlPanel. ---------------------------------------------------------------------- typo · 2014-12-21 16:18 Maybe Lazarus can house the 2 ways, one of Delphi compatibility, and another, with an independent way. I don't consider this (non- compatibility) as a not worthy way, but a Delphi user rages. ---------------------------------------------------------------------- skalogryz · 2014-12-21 18:33 Richmemo provides basic richedit properties: SelAttributes and Paragraph through a class helper - just add richmemohelpers unit to uses section. As well as find() method. ---------------------------------------------------------------------- arneolav · 2014-12-21 19:28 Uses ...RichMemo, RichMemoHelpers; ---> unit1.pas(1,1) Fatal: Unit RichMemoHelpers searched but RichMemo found   Lazarus 1.2.6 r46529 FPC 2.6.4 i386-win32-win32/win64 ---------------------------------------------------------------------- skalogryz · 2014-12-21 19:52 what's your RichMemo package revision? The unit has been added with r3752 (19 nov 2014) The latest richmemo update was with r3847 (20 dec 2014) ---------------------------------------------------------------------- arneolav · 2014-12-21 21:54 Version 1.0.0 , Same as SourceForeget, no update ...? ---------------------------------------------------------------------- typo · 2014-12-21 22:27 Try my RichMemo revision, only 45KB. What is special about this revision? Well, it compiles and installs fine on Windows. ---------------------------------------------------------------------- skalogryz · 2014-12-21 22:46 Sourceforge package 1.0.0 is outdated. I recommend to use trunk version from svn. ---------------------------------------------------------------------- arneolav · 2014-12-21 22:50 Than'x i'll try it. ---------------------------------------------------------------------- MoellerCLaus · 2015-01-03 16:10 skalogryz I wonder if you in your good work with RichMemo is considering developing: DBRichMemo DBLazreport component ---------------------------------------------------------------------- skalogryz · 2015-01-03 16:54 Quote from: MoellerCLaus on January 03, 2015, 05:10:08 pmI wonder if you in your good work with RichMemo is considering developing: DBRichMemo DBLazreport componentI'm sorry I don't. If anyone is considering developing them - I'm more than happy to help, but no plans to implement them myself. ---------------------------------------------------------------------- MoellerCLaus · 2015-01-05 18:12 Don't be I will look into it. Maybe it's easier to enhance your component with a DB and Lazreport version than to shift to TK and Fortes report. Thanks for your offer to contribute - most appriciated. ---------------------------------------------------------------------- skalogryz · 2015-01-05 18:24 Quote from: MoellerCLaus on January 05, 2015, 07:12:47 pmI will look into it. Maybe it's easier to enhance your component with a DB and Lazreport version than to shift to TK and Fortes report. Please note that RichMemo package should not be dependent on DB package. Thus if you create TDBRichMemo it should be in a separate package. ---------------------------------------------------------------------- MoellerCLaus · 2015-01-07 18:55 Just to avoid misunderstandings. When you write QuotePlease note that RichMemo package should not be dependent on DB package. Thus if you create TDBRichMemo it should be in a separate package.you mean completely different version lines. I am not allowed to include Richmemo in uses clauses in DBRichMemo; but it is OK for you to let me work further on your current RichMemo present date?   For me to see there are two ways to go from here? 1. I include Richmemo in the uses clause of DBRichMemo 2. I take a copy of your Richmemo and rename it to DBRichmemo and make sure that both can be compiled and linked into Lazarus IDE. ---------------------------------------------------------------------- skalogryz · 2015-01-07 19:10 I'm not sure if I'm following you but: You're good with including RichMemo into uses section of DBRichMemo. No issues here. ---------------------------------------------------------------------- MoellerCLaus · 2015-01-17 11:43 ;)OK skalogryz here a first draft of a DBRichmemo. It works for me. ---------------------------------------------------------------------- Nana · 2015-01-19 11:13 hallo, i get an compiling Error ihelpcontrol.pkg is missing ? Best regards Nana ---------------------------------------------------------------------- skalogryz · 2015-01-19 13:03 Quote from: MoellerCLaus on January 17, 2015, 12:43:37 pm ;)OK skalogryz here a first draft of a DBRichmemo. It works for me. Now that looks promising! Great job! ---------------------------------------------------------------------- skalogryz · 2015-01-19 13:04 Quote from: Nana on January 19, 2015, 12:13:54 pmi get an compiling Error ihelpcontrol.pkg is missing ? you get this error when you compile what package? ---------------------------------------------------------------------- Nana · 2015-01-19 13:18 Hallo skalogryz, I get the error while compiling DBRichMemo from Claus Moeller. Best regards Nana ---------------------------------------------------------------------- skalogryz · 2015-01-19 13:25 Quote from: Nana on January 19, 2015, 02:18:35 pmI get the error while compiling DBRichMemo from Claus Moeller. It could be that ihelpcontrol is selected in Lazarus as a package for installation. DBRichMemo doesn't really need it. Thus if you'd open "Packages->Install/Uninstall packages" and uninstall lhelpcontrol package, it should let you install DBRichMemo. ---------------------------------------------------------------------- TurboRascal · 2015-01-20 14:10 Just a suggestion, if there will be both TRichMemo and TDBRichmemo containing much of the same stuff, it may be worth creating something like a TCustomRichMemo class from which both would be inherited... ---------------------------------------------------------------------- rvk · 2015-01-20 14:16 Quote from: TurboRascal on January 20, 2015, 03:10:26 pmJust a suggestion, if there will be both TRichMemo and TDBRichmemo containing much of the same stuff, it may be worth creating something like a TCustomRichMemo class from which both would be inherited... That's exactly what the DBRichMemo from Claus Møller does (from earlier in this topic). (See this post: http://forum.lazarus.freepascal.org/index.php/topic,26 810.msg167231.html#msg167231) ---------------------------------------------------------------------- MoellerCLaus · 2015-01-20 18:31 QuoteNow that looks promising! Great job!Thanks. I will now look at how to integrate your RichMemo in to LazReport! Doing full circle ---------------------------------------------------------------------- eldonfsr · 2015-02-22 21:09 do you have sample using dbrichmemo.  thanks