Questions tagged [memo]
144 questions
21
votes
1 answer
Why does memo.Lines use TStrings instead of TStringList?
Why does Memo.Lines use the abstract class TStrings? Why doesn't it use TStringList instead?
And should I convert it to TStringList before working with it?

Illiou
- 315
- 1
- 2
- 9
20
votes
3 answers
Typescript generic class equivalent for React.memo
Is there any way to set new generic in React.memo?
For example, for class components, I can use
// set generic
class GenericClass extends PureComponent {}
// and use like this
/>
In the below…

Thu San
- 1,400
- 1
- 17
- 29
20
votes
3 answers
React memo components and re-render when passing function as props
Suppose I have these React components:
const Compo1 = ({theName}) => {
return (
console.log('Dr. ' + theName)}/>
);
};
const Compo2 = ({theName}) => {
function theFoo() {
console.log('Dr. ' + theName);
}
return…

rodrigocfd
- 6,450
- 6
- 34
- 68
13
votes
5 answers
React.memo isn't working - what am I missing?
I'm in the process of refactoring some of our components so I'm trying to incorporate memoization as some components may re-render with the same values (for example, hotlinked image URLs unless they are the same).
I have a simple component:
const…

user.io
- 396
- 1
- 6
- 17
9
votes
2 answers
React.useMemo does not update the data
I am new to hooks. So this might be easy yet I have no idea how to solve:
I have a function like this which takes two arrays columns and data . and those data should be memoized or else it does not work. (recommended by react-table guys)
function…

Amir Shahbabaie
- 1,352
- 2
- 14
- 33
9
votes
3 answers
How do I shallow test a react component wrapped in memo and withStyles?
I have a component which is wrapped in both a Material-UI withStyles HOC and a React memo HOC.
I am unable to test this component as I am unable to call dive():
ShallowWrapper::dive() can only be called on components
The only option I am currently…

Ed Allonby
- 157
- 1
- 2
- 9
9
votes
12 answers
DBGrid showing "(MEMO)" as the value of string fields
I'm trying to write a simple SQLite application using Lazarus and the SQLdb components.
I connect to the database and populate a TDBGrid. Problem is that all columns that are text fields display the value "(MEMO)" rather then the string in database.

HandyGandy
- 660
- 2
- 6
- 15
9
votes
9 answers
Why C/C++ have memory issue?
I have read lots of programmers saying and writing when programming in C/C++ there are lots of issue related to memory. I am planning to learn to program in C/C++. I have beginner knowledge of C/C++ and I want to see some short sample why C/C++ can…

LinuxNewbie
- 1
- 4
9
votes
2 answers
How to intercept (detect) a Paste command into a TMemo?
How to catch Paste command and change text of Clipboard before that text is pasted into a TMemo, but, after Paste, text in Clipboard must be same like before changing?
Example, Clipboard have text 'Simple Question', text that go in the TMemo is…

Srdjan Vukmirica
- 743
- 2
- 8
- 22
8
votes
5 answers
Newline Inside a String To Be Shown At a TMemoBox
I'm building a String called FullMemo, that would be displayed at a TMemoBox, but the problem is that I'm trying to make newlines like this:
FullMemo := txtFistMemo.Text + '\n' + txtDetails.Text
What I got is the content of txtFirstMemo the…

Nathan Campos
- 28,769
- 59
- 194
- 300
7
votes
1 answer
Pass Children prop to React Memo component
I am currently in the process of optimising a number of React SFC components with the use of React.memo.
Most of these components have children. The project also uses TypeScript.
I was starting to get the impression that memo components did not…

Adam McKenna
- 2,295
- 6
- 30
- 41
7
votes
4 answers
Load Log.txt From other apps to Memo - Delphi7
I am trying to record the session log from other applications (Proxifier) to a Memo.
I've tried using the command :
procedure TForm1.TimerTimer(Sender: TObject);
begin
Memo1.Lines.LoadFromFile('C:\PMASSH\Proxyfier\Profiles\Log.txt');
end;
but at…

Pujangga Adhitya
- 71
- 1
- 3
5
votes
3 answers
How I can replace strings in a memo (FastReport)?
I have a memo object in my report, and a need replace "%...%" strings. For example, in Rave Report:
MemoBuf.ReplaceAll('%my_str%', "new string", false);
But, don't exists a method (or property) to replace text, in the FastReport. How I can do…

André
- 139
- 1
- 2
- 10
5
votes
2 answers
How do I apply React.memo to all components in an array?
Is it possible to apply React.memo to an array of components with a for loop?
Say I have the following three components:
const Item1 = (props) => {
const { index } = props;
return (
{index}
);
}
const Item2…
Amos
- 333
- 1
- 3
- 12
5
votes
2 answers
Delphi - AutoComplete Memo
I am requiring a Memo with Auto-completion functionality.
Ultimately, I would like the ability to display a custom auto-completion list when the user presses a hotkey (Ctrl-space) similar to Delphi IDE auto-completion.
I have the TMS AdvMemo, but…

Simon
- 9,197
- 13
- 72
- 115