Forum > RichMemo

Installing RichMemo into Lazarus 2.0.0

(1/3) > >>

rick2691:

--- 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";}};} ---// Callback function for EM_STREAMOUT ... by the TEAM//function EditStreamOutCallback(dwCookie: Longint; pbBuff: PByte;                               cb: Longint; var pcb: Longint): DWORD; stdcall;begin                          //  DWORD was Longint  // This will write the contents of the RichEdit to a TMemoryStream field.  //  // dwCookie is Application-defined, so we're passing the blob stream.  //  pcb:= TMemoryStream(dwCookie).Write(pbBuff^, cb);  Result:= 0;end;   
The above code was running in version 2.0.12
I just installed 2.2.0 and RichMemo will not get past debugging.

It give the following error message:
frm1.pas(1183,9) Error: Illegal type conversion: "LongInt" to "TMemoryStream"

I changed TMemoryStream to TStringStream and it give the same error again.

I tried to install RichMemo by a disk "lpk", but it can't find Graph "ppu" file. So I installed by the Online Package Manager. It appeared to install correctly. However, It paused installation to ask me something about the debugger. It offered an option 1, 2 , or both drivers. I said both because I had no idea what either of them were.

I hate ugrading to the latest and greatest of anything.

Rick

wp:
What do you want to achieve with this? Save the contents of the RichMemo to a memory stream as the comment says? In this case, why don't you use the corresponding method TCustomRichMemo.SaveRichText?


--- 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";}};} ---function TCustomRichMemo.SaveRichText(Dest: TStream): Boolean;

rick2691:
wp,

The code I posted is for using a CallBack function. I am showing it so that you will know that the code is proper. It was operating only one hour ago. Then I installed the latest version of Lazarus compiler. Now the debugging in this new version is saying that valid codes are invalid, and it won't compile my program.

Your suggestion is interesting, but the issue is that the debugger is broken, and I am assuming that it is RichMemo related.

Rick

rick2691:
I believe that I wasn't specific enough. The debugger is halting compilation because TStream(dwCookie) and TMemoryStream(dwCookie) are invalid operations. It reports ... Error: Illegal type conversion: "LongInt" to "TMemoryStream"

I know that TStream(dwCookie) is valid because I have been using that code many years. Moreover, The first instance of this happening is by my having to use "Online Package Manager" to install Richmemo. However, Richmemo is the only component that I use streaming with. Otherwise, it would have to be the Debugger's database.

Rick

rick2691:
I have gone back to version 2.0.10
Everything works as coded.
Thanks for all the help.

Rick

Navigation

[0] Message Index

[#] Next page

Go to full version