Recent

Author Topic: Problem installing #7927  (Read 3710 times)

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Problem installing #7927
« on: December 15, 2020, 07:52:38 pm »
The 2020-07-11 version of win32richmemoproc.pas

LINE 1065 ...   st := TStringStream.Create;

The install hangs and states that it should be:   
st := TStringStream.Create(something);

Rick

using Lazarus 1.6.4 and Win10
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Problem installing #7927
« Reply #1 on: December 15, 2020, 08:01:06 pm »
please try r7929

Are you really on Lazarus 1.6.4?

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Problem installing #7927
« Reply #2 on: December 15, 2020, 08:38:47 pm »
skalogryz,

Yes, I recently tried 1.8.4 and 2.0.10, both 32bit and 64bit. Both of them had troubles with RichMemo, so I went back to 1.6.4, 32bit. This snag is the only one that it reports. It has always been the "no nonsense" champion for me.

I use RichMemo in my daily work. I keep business notes, and I have also written a book. I was never able to get it to handle Syriac fonts, but it does Hebrew and English just fine, and I can write Syriac with the Hebrew script anyway. So I have settled into a "work around."

I thought that r7927 was the latest version ... where do I find r7929?

Rick
« Last Edit: December 15, 2020, 08:58:59 pm by rick2691 »
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Problem installing #7927
« Reply #3 on: December 15, 2020, 10:48:08 pm »
I recently tried 1.8.4 and 2.0.10, both 32bit and 64bit. Both of them had troubles with RichMemo, so I went back to 1.6.4, 32bit. This snag is the only one that it reports. It has always been the "no nonsense" champion for me.
what kind of problems? I've tried with 2.0.10 work (Win32) worked just fine.


I thought that r7927 was the latest version ... where do I find r7929?
It should be in the richMemo repository. If you're not using SVN just wait for a day and the updated version should be available for the download.

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Problem installing #7927
« Reply #4 on: December 16, 2020, 04:47:36 pm »
** what kind of problems **
I was expecting this to come back at me. Both 1.8.4 and 2.0.10 (on my Win10 computer with either 32 or 64bit compiler) will not install the 2020 RichMemo package ... nor any RichMemo version.

But 1.6.4 (using the 32bit compiler) will install both the 2017 and 2020 RichMemo packages. With the other compiler versions it seems to be a registration problem.

** it should be in the richmemo repository **
Yes, I found the file and installed it ... subject to the above scenario.

Maybe I don't know how to click a button, but the above is what happens to me no matter how many times I try to do it.

================

That said ... I have another problem. I have found that when a text contains mixed superscript and style formats, and I try to change the style, scripting or colors, it will change the scripting to vpNormal. But this does not happen with Subscript formatting.

Every other attribute is always retained unless it is the subject of the change. There also is not a problem with a change to Superscript. It does that as it should, but it will not be retained if it is in the selection for changing everything to a different attribute.

I looked through all of my code, and I cannot find anything that would cause this. I have also looked through "RichMemo.pas" and can't find an issue.

I was able to run the 2020 richmemo package, even though it was not registered, on the 2.0.10 compiler ... and this problem did not occur. But when I turned the compiler off, and then launched it again, richmemo would not function because it was not registered. The compiler would say that it could not find an "lfm" file nor the richmemo file, and it was not registered.

I downloaded the compiler twice (reinstalling it several times), and your install package a few times. Each instance had always given the same results.

But I do wonder about the RichMemo unit ... I have never understood how a procedure or function can have double entries, even though they have different parameter fields. It is obviously OK, because you do that everywhere, but I wouldn't think that the parameter list would be included as its name. Here is an example ...

Code: Pascal  [Select][+][-]
  1. procedure TCustomRichMemo.SetTextAttributes(TextStart, TextLen: Integer;  
  2.   AFont: TFont);
  3. begin
  4.   if not Assigned(AFont) then Exit;
  5.   SetTextAttributes(TextStart, TextLen, GetFontParams(AFont));
  6. end;
  7.  
  8. procedure TCustomRichMemo.SetTextAttributes(TextStart, TextLen: Integer;  
  9.   {SetMask: TTextStyleMask;} const TextParams: TFontParams);
  10. begin
  11.   if not HandleAllocated then HandleNeeded;
  12.   if HandleAllocated then
  13.     TWSCustomRichMemoClass(WidgetSetClass).SetTextAttributes(Self, TextStart, TextLen, {SetMask,} TextParams);
  14. end;  
  15.  

Nevertheless, the first procedure has GetFontParams(AFont) instead of the TextParams that the second has. Could that be generating a vpNormal parameter?

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Problem installing #7927
« Reply #5 on: December 16, 2020, 05:01:38 pm »
But I do wonder about the RichMemo unit ... I have never understood how a procedure or function can have double entries, even though they have different parameter fields. It is obviously OK, because you do that everywhere, but I wouldn't think that the parameter list would be included as its name.

That is called overloading and can only be done if the two (or more) same-named functions/procedures have a different "signature", which in this case means different parameters. See Function overloading, in the Language Guide.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Problem installing #7927
« Reply #6 on: December 16, 2020, 06:03:23 pm »
lucamar,

That explains it, but it seems like an odd practice to allow. Is there ever a chance of it going awry? It certainly looks a time consumer.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Problem installing #7927
« Reply #7 on: December 16, 2020, 06:18:04 pm »
That explains it, but it seems like an odd practice to allow. Is there ever a chance of it going awry? It certainly looks a time consumer.

Not really odd and it rarely goes awry (mostly, when you use equivalent types for different overloads and the compiler doesn't know which it should select). And it's no more time consuming that having to think different names for what is essentialy the same functionality applied to different types.

Take, for example, the function SetLength(): It applies both to Strings and Arrays of any type and it's the same concept for all. Would you rather have SetStringLength() and SetArrayLength()? ;)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Problem installing #7927
« Reply #8 on: December 16, 2020, 06:46:53 pm »
lucamar,

Quote
Would you rather have SetStringLength() and SetArrayLength()?

I am afraid you have asked that question to the wrong person. I program that way all the time.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Problem installing #7927
« Reply #9 on: December 17, 2020, 05:06:56 pm »
I made on more effort to install the 2.0.10 compiler. I uninstalled 1.6.4, and deleted its remaining folder. Then I went to C:\Users\rwill\AppData\Local\lazarus and deleted that folder ... "rwill" is my user name.

Then I used Open Package File (.lpk) and selected the 2020 RichMemo Package. It did not install. I then went to Package Links and saw that it was in the Repository but not installed. So I went to Online Package Manager, selected the RichMemo package, and hit Install and from Repository ...

It finally installed, and ran properly. It also did not have the Superscript problem.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

 

TinyPortal © 2005-2018