Recent

Recent Posts

Pages: 1 ... 8 9 [10]
91
General / Re: [SOLVED]RichMemo StringReplace?
« Last post by KodeZwerg on April 22, 2024, 08:44:40 pm »
As an alternate, nobody has thought about, simply use the RichMemo api to solve that problem like I have shown here.
Since I was in hurry while posting it, it might need adjustments to properly work.
92
Other / Re: Copyrights Q
« Last post by MarkMLl on April 22, 2024, 08:37:28 pm »
Unless I'm mistaken, optical discs have quite a thick layer of plastic between the underside and the metal film that holds the data. So it should be possible to polish the plastic layer back to more or less its original clarity, unless the data layer is damaged.

Up to a point: polishing will almost always leave scratches of the same sort of size as the features you're trying to read, and there's also a risk that the metal layer has degraded (particularly if the medium was laser-writeable rather than pressed).

However, I have discovered something interesting over the last few months. One of my audio CDs was, after a certain point, unreadable in a PC (i.e. DVD) drive; however it's fine in a much older audio CD player with Philips mechanism. This is probably something to do with the wavelength of the light (i.e. red rather than green), but could possibly also be affected by other optical considerations (e.g. Philips mechanism might have a shorter focal length than the dominant Japanese and Chinese ones, with less depth of field hence when focusing on the metalisation doesn't resolve surface degradation or defects within the pastic).

MarkMLl
93
Other / Re: Copyrights Q
« Last post by MarkMLl on April 22, 2024, 08:27:43 pm »
I've tried, unsuccessfully, to locate the authors of the book in the hope I could get a .iso from  one of them.  No luck so far.  TTBOMK, there is no corporate successor to the defunct company (google couldn't find one.)

Google isn't relevant and you risk getting into trouble if you rely on them. You need the body that regulates corporates in the relevant jurisdiction.

MarkMLl
94
General / Re: RichMemo StringReplace?
« Last post by ReinaldoDuvida on April 22, 2024, 08:24:18 pm »
What do you want to do? More find and replace?
The StringReplace works now, but it removes all existing Rtf formatting in the RichMemo. I was wondering if there is a way to preserve this formatting, and Replace the string with the same font as the string that is being replaced? Thanks.

I discovered a way to use StringReplace without losing RichMemo's previous formatting. First I convert the scanned text with its formatting to a StringStream and place this stream value in a Memo. Then I will use StringReplace on the Memo text. Then I converted the memo text to a StringStream and made RichMemo read this StringStream.

Converting RichMemo text to a StringStream and placing the stream value in the Memo:
Code: Pascal  [Select][+][-]
  1. procedure TfRichTextDois.GetStream;
  2. var
  3.   stStringStream : TStringStream;
  4. begin
  5.   Memo1.Clear;
  6.   stStringStream := TStringStream.Create;
  7.   RichMemo1.SaveRichText(stStringStream);
  8.   Memo1.Lines.Add(stStringStream.DataString);
  9.   FreeAndNil(stStringStream);
  10. end;
  11.  

Using StringReplace in Memo:
Code: Pascal  [Select][+][-]
  1. RichMemo1.Lines.Text := StringReplace(RichMemo1.Lines.Text,
  2.                                                           edt_wordsearch.Text,
  3.                                                           edt_wordreplace.Text,
  4.                                                           [rfReplaceAll]);  
  5.  

Taking the memo value, converting it to a StringStream and making RichMemo read this stream:
Code: Pascal  [Select][+][-]
  1. procedure TfRichTextDois.SetStream;
  2. var
  3.   stStringStream : TStringStream;
  4. begin
  5.   stStringStream := TStringStream.Create;
  6.   stStringStream.WriteString(Memo1.Lines.Text);
  7.   stStringStream.Position := 0;
  8.   RichMemo1.LoadRichText(stStringStream);
  9.   FreeAndNil(stStringStream);
  10. end;    
  11.  

95
Other / Re: Copyrights Q
« Last post by BrassGear on April 22, 2024, 08:14:33 pm »
Unless I'm mistaken, optical discs have quite a thick layer of plastic between the underside and the metal film that holds the data. So it should be possible to polish the plastic layer back to more or less its original clarity, unless the data layer is damaged.
96
Designer / Re: Same project and two Pcs
« Last post by wp on April 22, 2024, 08:06:47 pm »
Strange. Your first post looks as if the contents of the form have moved out of the form at design-time. But from all I know about the docked-formeditor I would expect the form to be correct at designtime, and to disappear at runtime in case of out-of-screen Left/Top coordinates.

This looks to me like a bug of the docked-formeditor. Now that you can reproduce the issue, can you prepare a small demo project which could be used for digging deeper? Just a simple form with one of two controls on it. Pack the .pas, .lfm, .lpi and .lpr files into a common .zip and upload it here under "Attachments and other options".

Sure! Here it is a sample
Do you work with two monitors?
97
Hi jmpessoa!

You're right, this directive corrects the problem!  8-)  :)

Many many many thanks!

[Edit]lamw_manager reports an error: "please wait, saving LAMW4Linux config .../home/alcatiz/Téléchargements/LAMWManager-linux-base-state/lamw_manager/core/settings-editor/lamw-settings-editor.sh: ligne 183: update-desktop-database : unknown command"[/Edit]
98
Other / Re: Copyrights Q
« Last post by 440bx on April 22, 2024, 08:02:07 pm »
Thank you Martin.

Getting an original CD is the "proper" way.  For that I'd need to purchase a used copy of the book.  I found two problems with that possibility, the first one is the book is selling used for quite a bit more than its list price (go figure) and the worst part is, there is no guarantee that the CD is in working condition.  Most of the time, it is but, I've had some with areas that were unreadable.

Anyway, I'll figure something out.  Thank you for the reply, it's pretty much along the lines of what I expected but, figured I'd ask anyway.



@Mark,

I've tried, unsuccessfully, to locate the authors of the book in the hope I could get a .iso from  one of them.  No luck so far.  TTBOMK, there is no corporate successor to the defunct company (google couldn't find one.)

Julian Bucknall authored a book for that defunct company.  Not sure when and how exactly but, he became the book's copyright owner and makes the CD contents available.   Of course, that is his choice and it has no effect on the other books that are now orphaned.

I was hoping one of the authors of the book whose CD I want would have done something similar but, so far, no luck.

99
Designer / Re: Same project and two Pcs
« Last post by n7800 on April 22, 2024, 07:59:28 pm »
There are already two issues on the bug tracker:

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/23929
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40491

I asked about the first one at the beginning, but in your case it turned out to be the second one.

No less interesting is why the coordinate turned out to be negative at all.
100
Designer / Re: Same project and two Pcs
« Last post by caiov1n1c1us on April 22, 2024, 07:52:23 pm »
Strange. Your first post looks as if the contents of the form have moved out of the form at design-time. But from all I know about the docked-formeditor I would expect the form to be correct at designtime, and to disappear at runtime in case of out-of-screen Left/Top coordinates.

This looks to me like a bug of the docked-formeditor. Now that you can reproduce the issue, can you prepare a small demo project which could be used for digging deeper? Just a simple form with one of two controls on it. Pack the .pas, .lfm, .lpi and .lpr files into a common .zip and upload it here under "Attachments and other options".

Sure! Here it is a sample
Pages: 1 ... 8 9 [10]

TinyPortal © 2005-2018