-
Content Count
20 -
Joined
-
Last visited
Community Reputation
3 NeutralAbout CoMPi74
- Birthday 11/02/1974
Technical Information
-
Delphi-Version
Delphi Community Edition
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Nobody? Really? Maybe @dummzeuch?
-
1. Is it possible to persistently hide history pane in grep results? I am not sure but I think I remember that some time ago it was possible. Anyway, now (since version 1.3.20) I am not able to achieve that 😕 Deselecting 'View -> History list' checkbox does not work because, from time to time, the pane is showing anyway. Of course, when it happens, the checkbox is checked. I hope I not need to mention that I don't turn on this checkbox myself;) 2. Almost everytime I use grep for searching some (any?) string in all files in project group (maybe it also happens with other settings but I did not check it) I got 'Out of memory' error. The situation happens regardless of whether there is, or not, free memory. Followed grep options are checked: Whole word, Search form files, All file in project group, Parse map file and all options in Delphi Code Content Types and Delphi Code Sections. Can anyone confirm these problems? PS. Delphi XE4, GExperts 1.3.21
-
Parnassus Bookmarks for Delphi 11 Alexandria?
CoMPi74 replied to PeterPanettone's topic in Delphi IDE and APIs
Any news? -
Generic event handler for a generic class
CoMPi74 replied to CoMPi74's topic in Algorithms, Data Structures and Class Design
Done 😉 Here is it: [RSP-34616] Object Inspector does not support generic properties - Embarcadero Technologies -
Generic event handler for a generic class
CoMPi74 replied to CoMPi74's topic in Algorithms, Data Structures and Class Design
@darnocian This is not the case I presented. I wanted to have an event handler which generic parameter T is same as in the class definition. I mean fevent2 should be rather TEvent2<T> instead of TEvent2<integer>. Did you try such a case? I did :/ I need it because I want to implement validation mechanism in TCustomEdit<T>.Change method, like in the code below: TEvent<V: record> = procedure (AValue: V) of object; TCustomEdit<T: record> = class(TEdit) public fValue: T; fEvent: TEvent<T>; protected procedure Change; override; published property Event: TEvent<T> read fEvent write fEvent; end; procedure TIMEdit<T>.Change; begin if Assigned(fEvent) then fEvent(fValue); end; -
Generic event handler for a generic class
CoMPi74 replied to CoMPi74's topic in Algorithms, Data Structures and Class Design
It is look like none of a generic property is visible in Object Inspector. But, of course, they are accessible from code. TCustomEdit<T: record> = class; TEvent1 = procedure (AValue: Integer) of object; TEvent2<V: record> = procedure (AValue: V) of object; TEvent3<V: record> = procedure (ASender: TCustomEdit<V>; AValue: V) of object; TCustomEdit<T: record> = class(TEdit) public fEvent1: TEvent1; fEvent2: TEvent2<T>; fEvent3: TEvent3<T>; published property Event1: TEvent1 read fEvent1 write fEvent1; // Accesible from Object Inspector and from code property Event2: TEvent2<T> read fEvent2 write fEvent2; // Only from code property Event3: TEvent3<T> read fEvent3 write fEvent3; // Only from code end; TEditEx = class(TCustomEdit<Integer>); ... RegisterComponents('Test controls', [TEditEx]); BTW. It looks like Delphi (10.4 CE) crashes because of CnMemProfProject wizard (CnPack, v. 1.2.0.1040 Unstable). But it is just an intermediate reason. The AV comes from System.TypInfo.GetPropInfos so definitely something is up. -
Generic event handler for a generic class
CoMPi74 replied to CoMPi74's topic in Algorithms, Data Structures and Class Design
Nope. It does not change anything 😕 -
Generic event handler for a generic class
CoMPi74 replied to CoMPi74's topic in Algorithms, Data Structures and Class Design
@David Millington, what do you think? It is a bug? -
Generic event handler for a generic class
CoMPi74 replied to CoMPi74's topic in Algorithms, Data Structures and Class Design
I think so too, but it is quite strange, because OnChange of TIntEdit is just TOnChange(ASender: TIntEdit, AValue: Integer). Does not it? -
Generic event handler for a generic class
CoMPi74 posted a topic in Algorithms, Data Structures and Class Design
Hi there, I have a component like this: TCustomEdit<T: record> = class; TOnValidate<T: record> = function (ASender: TCustomEdit<T>; AValue: T): Boolean of object; TCustomEdit<T: record> = class(TEdit) private fOnValidate: TOnValidate<T>; // code here published property OnValidate: TOnValidate<T> read fOnValidate write fOnValidate; end; TIntEdit = class(TCustomEdit<Integer>) // code here end; The code compiles and TIntEdit registers without any complaints. But, when I want to drop the component onto a form, Delphi crashes with AV. What I am missing? I tested it on Delphi XE4 and Delphi 10.4 CE. It's a bug, feature of just "by design"? @Stefan Glienke, will you help? Anyone? -
This is the way I am doing it right now. Though, I do not use a "special" tool ;) Instead I use Notepad++. It is enough for small projects but I am going to cleanup a significantly larger project and I need a better tool.
-
@Ondrej Kelle, @Kas Ob. I'll look at it this weekend. Thanks :)
-
@Uwe Raabe That's not very good news 😕
-
It's all a song of the future :) I was thinking about a much simpler tool. Because I know best what files interest me, at least initially, I assume that the filtering will be based on a selected list of files (e.g. read from a text file).
-
@Lars Fosdal Such a skill is both a gift and a curse 😉 I know something about it 😉 Coming back to the matter, as you mentioned, I also hope that @dummzeuch will be able to help. Or @Uwe Raabe or @David Millington?