Recent

Author Topic: TRichMemo install  (Read 17783 times)

Astral

  • New Member
  • *
  • Posts: 49
TRichMemo install
« on: July 01, 2009, 01:10:22 pm »
I've tried several times to install TRichMemo component.

I clicked on Open Package file (*.lpk) under Packages.

It brings up a menu and I click Install.

It says that Lazarus has to be recompiled in order to incorporate
the changes.

So I click on Yes, I do want to recompile Lazarus and Restart.

Unfortunately, after that nothing happens.  There is no evidence
that Lazarus is being recompile or any sign of any progress.

It just acts like I had never agreed to the recompile.

Earlier I installed another package which required a recompile of
Lazarus and it apparently DID recompile Lazarus and then asked me if I wanted to restart.  When I restarted it said it could not rename the old lazarus.exe file in order to create the new one, or some words to that effect.

Perhaps I never really finished installing the one component, and it won't recompiile Lazarus a second time?

What could I be doing wrong?

Any suggestions would be appreciated.

Apparently the TRichMemo is not being installed and when I try to compile the samples demo it complains about it being missing.

At least it could tell me what is going on when it says it has to recompile Lazarus.  Instead it just sits there and seems to be doing nothing at all.

If anyone could add some light to my way, it would be appreciated.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2290
    • havefunsoft.com
Re: TRichMemo install
« Reply #1 on: July 01, 2009, 01:39:50 pm »
you can try to build IDE in the following way:
Tools->Configure Build Lazarus->Quick Build Options->Build IDE with Packages

press Build.
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #2 on: July 01, 2009, 02:13:10 pm »
The package richmemopackage 1.0 failed to compile,
remove it from the installation list?

It seems to be complaining about the WSRegisterClass.
Perhaps I need some more paths installed in the compiler
options?

Here is part of the module which didn't compile:

The error message says something like:

There is no method in an ancestor class to be overridden: "class TCustomRichMemo.WSRegisterClass.

Code: [Select]
{ TCustomRichMemo }

  TCustomRichMemo = class(TCustomMemo)
  private
    fHideSelection  : Boolean;
  protected
    class procedure WSRegisterClass; override;
    procedure CreateWnd; override;   
    procedure UpdateRichMemo; virtual;
    procedure SetHideSelection(AValue: Boolean);
    function GetContStyleLength(TextStart: Integer): Integer;
  public
    procedure SetTextAttributes(TextStart, TextLen: Integer; const TextParams: TFontParams); virtual;
    function GetTextAttributes(TextStart: Integer; var TextParams: TFontParams): Boolean; virtual;
    function GetStyleRange(CharOfs: Integer; var RangeStart, RangeLen: Integer): Boolean; virtual;
                                                                       

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2290
    • havefunsoft.com
Re: TRichMemo install
« Reply #3 on: July 01, 2009, 02:18:33 pm »
TRichMemo requires 0.9.27 lazarus version.

please, update using svn or by using the latest snapshot: http://snapshots.lazarus.shikami.org/lazarus/
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #4 on: July 01, 2009, 03:06:06 pm »
Ok, thanks!

I have version 0.9.26.2 Beta.

I'm not sure what svn is, but it would be nice not to have
to reinstall Lazarus from scratch. I'd never get all the options
set correctly again.

Is there an upgrade process, or do I have to uninstall the old
version first?

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #5 on: July 01, 2009, 03:38:05 pm »
I downloaded the latest 0.9.27 snapshot and it seemed to install
fine over the top of the previous 0.9.26.2 Beta installation.

However my very first compile found two missing units, called
Interfaces and Forms.

I must be missing something in the source paths, but I don't
know what to add.

Code: [Select]
program iTrans;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { you can add units after this }, iMain, LResources, Menus, iTables, .. (more of my own units) ...
lazcustforms;

{$IFDEF WINDOWS}{$R iTrans.rc}{$ENDIF}

begin
  {$I iTrans.lrs}
  Application.Initialize;
  Application.CreateForm(TMainForm, MainForm);
  Application.Run;
end.


Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: TRichMemo install
« Reply #6 on: July 01, 2009, 03:46:56 pm »
The snapshot has been compiled with fpc 2.2.4, your configuration probably still refers to fpc 2.2.2. Update the paths in the environment options.

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
Re: TRichMemo install
« Reply #7 on: July 01, 2009, 04:03:26 pm »
I downloaded the latest 0.9.27 snapshot and it seemed to install
fine over the top of the previous 0.9.26.2 Beta installation.

However my very first compile found two missing units, called
Interfaces and Forms.

I must be missing something in the source paths, but I don't
know what to add.

Code: [Select]
program iTrans;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { you can add units after this }, iMain, LResources, Menus, iTables, .. (more of my own units) ...
lazcustforms;

{$IFDEF WINDOWS}{$R iTrans.rc}{$ENDIF}

begin
  {$I iTrans.lrs}
  Application.Initialize;
  Application.CreateForm(TMainForm, MainForm);
  Application.Run;
end.


If you will have more than one Lazarus on your computer, testing with both, I strongly recommend you, to start lazarus, from command line with something like this:
startlazarus --pcp=./config

With this, every lazarus, will use his own configuration files. My lazarus installations, were a chaos before using this way.

EDITED: I have bad english :P
« Last Edit: July 01, 2009, 06:05:18 pm by Lord_ZealoN »

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #8 on: July 01, 2009, 05:48:17 pm »
Well, thanks for the tips.

I managed to get it all running again, but I had to add a bunch of different paths to the Compiler Options, that I don't remember having to do when I did the first automated install.

The program seems to be running ok, much as it did before.
I can now try out the TRichMemo, and see if it is what I have been looking for.

Someone mentioned a TRichEdit for Lazarus.  I think they meant this TRichMemo, which doesn't have all the same features as the Delphi TRichEdit, but I'll get used to it, whatever its quirks.



skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2290
    • havefunsoft.com
Re: TRichMemo install
« Reply #9 on: July 01, 2009, 09:23:36 pm »
Someone mentioned a TRichEdit for Lazarus.  I think they meant this TRichMemo, which doesn't have all the same features as the Delphi TRichEdit, but I'll get used to it, whatever its quirks.
what TRichEdit features do you need?
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #10 on: July 02, 2009, 05:00:46 am »
Well, the simple answer is none.  I don't need TRichEdit for anything, but it seemed like the best thing available at the time on Windows with Delphi.  And I invested a lot of time and effort getting it working using the last free version of TNTware, before it went commercial.

My program is a language translator, so it needs a way for the user to load in text, or type it in manually, or cut/paste it into the window.  It has to be able to load Ansi, UTF-8, Unicode, or other file formats.  It needs to be able to cut/paste UTF-8.

I actually need more of a word processor window, instead of an editor window, the main difference being word wrap and proportional spacing (for readability).

SynEdit is working fine, except for the character spacing makes the output difficult to read.

I need to be able to display the output of the translator in a separate window, and highlight any words which were not in the dictionary or were unrecognized for some reason, usually delimited by < > (angle brackets) and highlighted in a different color (usually red).

That's one of the main features.

I also need proportional spacing, because it's difficult to read natural language in a fixed-pitch font.

TRichMemo will probably do all that I need, just haven't tried it yet. I had to install the latest snapshot of Lazarus 0.9.27 Beta, so I'm on the bleeding edge of technology now.  I try not to complain, but it took me quite some effort to figure out how to install the snapshot.  It would seem that all of the necessary paths are not in place for a full recompile.  But I made it through that!

I'm running again and I plan to try the TRichMemo.

I hate the way TRichEdit works, and it has so many problems, I would prefer NOT to ever have to deal with it again.  I might even try to use TRichMemo in my Delphi version of my program.

My main goal is to get my program to run on Windows, Linux, and Mac OSX, without too many source code changes.  I'm least familiar with OSX, so that's still off in my future.  If I had a time machine, I'd visit the future and see how it all turned out.

My program has been mostly a hobby for many years, but it might be time to make it available to others.  I've often thought about running it on some kind of handheld computer.  I am not sure if they are fast enough.

My program is very similar in to the Google translator at:


translate.google.com


I'd like to make my program available on a website, with remote access to a server, very similar to the Google translator or the Babel Fish translator.

I first started working on the idea of building a translator in about 1980, when I was living in Germany.  My first implementation was in Fortran on a VAX 11/780, if that gives you some idea of its lineage.

I called the program iTrans then and it's always been called that, since 1980.  www.itrans.com is not my site.   That program was a transliterator program for Indian languages like Hindi.

I never trademarked the name, so I'm afraid I'll have to rename the program.   Any ideas for a name would be appreciated.

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #11 on: July 02, 2009, 05:43:40 am »
I forgot to mention one feature!

I would like to be able to load RTF formatted files,
but I prefer working with plain text.

But a lot of people use WordPad or Word to create files.

I  suppose it would be nice to be able to load RTF and DOC formats directly, without requiring the user to convert the filies to a simple text format.

But that's not a hard and fast requirement,
just a nice to have.


Now I can't seem to find TRichMemo on the IDE menus anywhwere.

Isn't it supposed to be there by default in 0.9.27?

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #12 on: July 02, 2009, 07:27:01 am »
The snapshot has been compiled with fpc 2.2.4, your configuration probably still refers to fpc 2.2.2. Update the paths in the environment options.

I've been struggling for hours to install TRichMemo.

Apparently I have fpc 2.2.5.  Should I start all over again and
redownload a new snapshot.

This is very frustrating. I got to the point of ALMOST being able to compile, but it seemed to be missing a function called Register in RichMemo.

Something is missing and I don't know what?  Should I just give up and wait until TRichMemo is a standard part of the IDE?  Will it ever be?

I've been round and round the mulberry bush with this, adding path after path after path to my list of source directories and include directories.

I seem to be missing something.

I hope you can understand my frustration level.  Is there another way to do this?  What is svn?  That sounds like some sort of version control system, like cvs.

I also was wondering if the richmemopackage has to be installed for each project to appear on the IDE tool menus, or is it a one-time thing that you add to the IDE by compiling and installing the richmemopackage?

Needless to say I am horribly confused?

I have a c:\fpc directory and a c:\lazarus directory.  Does the Lazarus install put both of them out there, or is the c:\fpc directory a result of my manually installing fpc separately.  I don't really know whether the Lazarus installation also installs fpc and where it puts the files.  Are there some environment variables I need to set using the Windows/System/Advanced/Environment Variables menus?  Like LazarusDir, TargetOS, etc?

Is there a place I should be looking for answers to these questions?  I'm bewildered.  Should I get rid of my fpc directory and lazarus directory and start from scratch on the install?  Is there an uninstall that gets rid of all evidence that Lazarus and fpc has been on my system, so I can do a complete new installation from scratch?

Code: [Select]
{ This file was automatically created by Lazarus. do not edit!
  This source is only used to compile and install the package.
 }

unit richmemopackage;

interface

uses
RichMemoFactory, richmemoregister, RichMemo, LazarusPackageIntf;

implementation

procedure Register;
begin
  RegisterUnit('richmemoregister', @richmemoregister.Register);
  RegisterUnit('RichMemo', @RichMemo.Register);
end;

initialization
  RegisterPackage('richmemopackage', @Register);
end.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2290
    • havefunsoft.com
Re: TRichMemo install
« Reply #13 on: July 02, 2009, 09:56:31 am »
try to do the following:
* go to the folder there richmemo package is located.
* find a folder  named 'lib'.
* delete it
* try to install RichMemo package again.

Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

Astral

  • New Member
  • *
  • Posts: 49
Re: TRichMemo install
« Reply #14 on: July 14, 2009, 12:18:12 am »
No luck.  I will try this again later.  I've lost the mood I was in!  :)