-
Content Count
332 -
Joined
-
Last visited
-
Days Won
5
Everything posted by John Kouraklis
-
@pieomy Do they work on mac as well? In the download page macOS is removed. Do you use it for desktop apps?
-
It is unfair to judge the website based on our western standards... It is a matter of the markets they grow in. You can, also, see the difference in their demos which feel like a huge spam and p*rn campaign. But this format is so common in China and Japan. The components are amazing though...lot's of features and they work very smoothly in Android. Haven't tried in iOS Any comments about the components?
-
Hi, I am using TStringHelper.Replace to replace substrings in strings but it seems that it does not respect whole words. Anyone knows how to do this with Replace?
-
How to replace whole words in a string
John Kouraklis replied to John Kouraklis's topic in General Help
Thanks for the RegEx suggestions -
How to replace whole words in a string
John Kouraklis replied to John Kouraklis's topic in General Help
Yes, but I don't want to write a function from scratch -
How to replace whole words in a string
John Kouraklis replied to John Kouraklis's topic in General Help
@FredS What I need is to return 'yes, abc.def' -
How to replace whole words in a string
John Kouraklis replied to John Kouraklis's topic in General Help
@Silver Black That's what I use now and sadly does not replace whole words. Eg. in this string 'abc and abc.def' if you want to replace 'abc' whole word only the above and the one from stringhelper will replace both instances of 'abc' -
Ok, upgrade completed and things seem to be in place except the Connection Managers. I can see the files in Documents. Anyone knows how to make the (new) IDE recognise them? Does it use the registry? Edit: It doesn't seem to recognise GetIt installed packages.....sadly
-
I am also installing 10.3.1 right now...let's see
-
How to pass an unknown record to a function as argument
John Kouraklis posted a topic in RTL and Delphi Object Pascal
Hi, I want to write a function and allow the user of the function to pass a record that I do not know in advance. Then, the idea is I iterate through the fields in the function. Something like this: function pass (aRec: record): boolean; But a 'record' can't be used like this. I've thought of two approaches but without being able to make them work: 1. Use of pointers: function pass (aRP: Pointer): boolean; begin .... /// here I do not know how to (cast the pointer to any record and) iterate using RTTI /// I think this can not be done as the cast seems very arbitrary ... end; 2. A kind of adapter record: type TAdapterRec<T> = record instance: T constructor Create (aRec: T); end; and then tried to declare the function: function pass (aRec: TAdapterRec<T>): boolean; but generics like these are not allowed. Anyone can help with this? I would like to avoid using classes. Thanks -
How to pass an unknown record to a function as argument
John Kouraklis replied to John Kouraklis's topic in RTL and Delphi Object Pascal
@Clément Thanks a lot for this👌 -
How to pass an unknown record to a function as argument
John Kouraklis replied to John Kouraklis's topic in RTL and Delphi Object Pascal
@Mahdi Safsafi Thanks! the hack helps me a lot. About the debate regarding Create/Free, it looks to me it is good practice. Similar to this, I've seen people always but always setting interfaces to nil as a matter of coding style -
How to pass an unknown record to a function as argument
John Kouraklis replied to John Kouraklis's topic in RTL and Delphi Object Pascal
@Mahdi Safsafi Very cool. Thanks for this A couple of questions: 1. Do you need to create/Free TRTTIContext? All the books/articles I've seen they just use the record 2. The TypeInfo variable in DoSomething conflicts with TypeInfo from RTTI. It should use a different name, right? 3. How do I get the value of the fields now? I tried this: for lFields in LType.GetFields do Writeln(' '+lFields.Name + ': '+lFields.GetValue(TypeInfo(Rec)).AsString); but the instance in GetValue is not correct. Thanks again -
How to pass an unknown record to a function as argument
John Kouraklis replied to John Kouraklis's topic in RTL and Delphi Object Pascal
I would be great if this were possible... -
How to pass an unknown record to a function as argument
John Kouraklis replied to John Kouraklis's topic in RTL and Delphi Object Pascal
The goal is to extract the fields and their values from the record. The class function approach looks more promising but it looks such "openness" makes things complicated. I think I will pass the list of the fields directly rather than the record itself... Thanks everyone -
Guessing the decimal separator
John Kouraklis replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
@dummzeuch This is impossible to guess without any context. Maybe if you can sample a few numbers in the file you may be able to figure it out -
Guessing the decimal separator
John Kouraklis replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
@Uwe Raabe Ah yes... -
Running UnitTests for Mobile Devices
John Kouraklis replied to Ugochukwu Mmaduekwe's topic in Software Testing and Quality Assurance
Probably on both as TI uses a non-standard port But I don't know how to do it on Android. If you find out please share. I am interested -
Running UnitTests for Mobile Devices
John Kouraklis replied to Ugochukwu Mmaduekwe's topic in Software Testing and Quality Assurance
Yes I know the plugin. When you run the tests from TI, does it use the selected platform or only Win32? -
Running UnitTests for Mobile Devices
John Kouraklis replied to Ugochukwu Mmaduekwe's topic in Software Testing and Quality Assurance
@Stefan Glienke can TI listen to tests on Android now? Haven't tried -
version control system Version Control System
John Kouraklis replied to Soji's topic in Delphi IDE and APIs
I use SourceTree as well. It has some glitches but in general saves lots of command-line work- 49 replies
-
- git
- subversion
-
(and 1 more)
Tagged with:
-
Guessing the decimal separator
John Kouraklis replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Why don't you use TFormatSettings? It should load the locale of the machine -
Running UnitTests for Mobile Devices
John Kouraklis replied to Ugochukwu Mmaduekwe's topic in Software Testing and Quality Assurance
@Stefan Glienke Maybe the next version of TI can work on Android -
Running UnitTests for Mobile Devices
John Kouraklis replied to Ugochukwu Mmaduekwe's topic in Software Testing and Quality Assurance
I believe you need to open the ports that TestInsight is listening to -
Delphi 10.3 and the NOX emulator running Android 7
John Kouraklis replied to Yaron's topic in Cross-platform
Have you tried a simple project that does nothing?