Forum > RichMemo

RichMemo Errors

(1/1)

Raf20076:
Lazarus 2.2.4 RichMemo from lazarus-ccr-svn-r8628, Windows 7, 32bit

Hi guys

I've got some errors from RichMemo, when I compile richmemopackage.lpk (unit Win32RichMemoProc;  ) . Have got any ideas? Thanks


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---win32richmemoproc.pas(812,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>"win32richmemoproc.pas(784,22) Error: Incompatible types: got "<address of function(PDWord;PByte;LongInt;var LongInt):DWord;StdCall>" expected "<procedure variable type of function(LongWord;PByte;LongInt;var LongInt):DWord;StdCall>"

jamie:
I think there was some talk about that not working.

Have you tried to download the package from the online package manager?

Raf20076:
OK I have found this patch for this problem. I don't know if it works from here https://forum.lazarus.freepascal.org/index.php?topic=51914.0

The thing is that someone should fix this problem.

This is what is in patch


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ------ win32/win32richmemo.pas     Sun Sep 06 09:11:18 2020+++ win32/win32richmemo.pas     Tue Oct 27 09:40:56 2020@@ -1639,8 +1639,8 @@   end;   PStreamText = ^TStreamText; -{$IF FPC_FULLVERSION>=30301}-function Read(dwCookie:DWORD_PTR; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall;+{$IF FPC_FULLVERSION>=30200}+function Read(dwCookie:DWORD; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall; {$ELSE} function Read(dwCookie:PDWORD; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall; {$ENDIF}--- win32/win32richmemoproc.pas Sun Sep 06 09:11:18 2020+++ win32/win32richmemoproc.pas Tue Oct 27 09:40:55 2020@@ -758,8 +758,8 @@     pfnCallback : EDITSTREAMCALLBACK;   end;   -{$IF FPC_FULLVERSION>=30301}-function RTFLoadCallback(dwCookie:DWORD_PTR; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall;+{$IF FPC_FULLVERSION>=30200}+function RTFLoadCallback(dwCookie:DWORD; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall; {$ELSE} function RTFLoadCallback(dwCookie:PDWORD; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall; {$ENDIF}@@ -786,8 +786,8 @@   Result := cbs.dwError = 0; end; -{$IF FPC_FULLVERSION>=30301}-function RTFSaveCallback(dwCookie:DWORD_PTR; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall;+{$IF FPC_FULLVERSION>=30200}+function RTFSaveCallback(dwCookie:DWORD; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall; {$ELSE} function RTFSaveCallback(dwCookie:PDWORD; pbBuff:LPBYTE; cb:LONG; var pcb:LONG):DWORD; stdcall; {$ENDIF}  
Is anyone who can fix RichMemo packet analyzing above patch? Thanks

Thaddy:
That patch is incorrect. The version should be compared with < or <=, not simply = which ties it to a *specific* version,in this case even a development version. Or with reverse logic >=,>
As is, I think this will never be accepted.

rvk:

--- Quote from: Thaddy on November 21, 2022, 03:51:45 pm ---That patch is incorrect. The version should be compared with < or <=, not simply = which ties it to a *specific* version,in this case even a development version. Or with reverse logic >=,>
As is, I think this will never be accepted.

--- End quote ---
The patch has this:
{$IF FPC_FULLVERSION>=30200}
(where it was this previously: {$IF FPC_FULLVERSION>=30301})

How is this specific to a version?
Or am I missing something?

Navigation

[0] Message Index

Go to full version