-
Content Count
2718 -
Joined
-
Last visited
-
Days Won
160
Everything posted by Uwe Raabe
-
operator overloding Equal vs Multiply
Uwe Raabe replied to Eugine Savin's topic in RTL and Delphi Object Pascal
In Delphi a set is denoted with square brackets. Unfortunately a constant array is also denoted with square brackets. I have to admit that I am not happy with this language design decision either. The term [10] as well as (i being an integer) can be both a set or array constant. There is no rule for the compiler to choose one or another. There are scenarios where the compiler chooses different than the developer intended. If you feel that the compiler is doing wrong here, please open a bug report with this example. -
operator overloding Equal vs Multiply
Uwe Raabe replied to Eugine Savin's topic in RTL and Delphi Object Pascal
Probably because in the second case "[10]" is seen as a set constant by the compiler. It works if you declare a variable with a proper type: var b: boolean; a: array of Integer; r: TMyRecord2; begin try a := [10]; r := r * a; // this line is compiled b := r = a; // this line is not compiled except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. -
version control system Version Control System
Uwe Raabe replied to Soji's topic in Delphi IDE and APIs
As I am still looking for a usable GIT client that matches the ease of the TortoiseHG workbench, I should probably evaluate SourceTree again.- 49 replies
-
- git
- subversion
-
(and 1 more)
Tagged with:
-
how to load updated component code w/o rebuilding lib?
Uwe Raabe replied to David Schwartz's topic in Delphi IDE and APIs
The components you see in the Form Designer are those inside the BPL loaded at design time. As long as you don't re-compile this BPL you will work with the old version of the component. This can be different than the version compiled into your EXE, as long as the new source files are found somewhere in your search path. -
Should my record be a class instead?
Uwe Raabe replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
This is an class approach. The benefit is the full encapsulation of the private parts inside the implementation section. unit uGlobalData; interface type TGlobalData = class type TValue = record ValName: string; ValInProject: boolean; end; public { these should probably be properties instead } Id: Integer; RecName: string; Values: TArray<TValue>; procedure PrepareGlobalRec; virtual; abstract; end; function GlobalData: TGlobalData; implementation type TGlobalDataImpl = class(TGlobalData) private type TLocalRec = record LocalRecStr: string; // ... end; procedure LocalProc1; procedure LocalProc2; var LocalStrVar: string; LocalRecVar: TLocalRec; public procedure PrepareGlobalRec; override; end; procedure TGlobalDataImpl.LocalProc1; begin end; procedure TGlobalDataImpl.LocalProc2; begin end; procedure TGlobalDataImpl.PrepareGlobalRec; begin // prepare GlobalRec data LocalStrVar := 'local test'; LocalRecVar.LocalRecStr := 'test'; LocalProc1; LocalProc2; end; var GlobalDataInstance: TGlobalData = nil; function GlobalData: TGlobalData; begin if GlobalDataInstance = nil then begin GlobalDataInstance := TGlobalDataImpl.Create; end; Result := GlobalDataInstance; end; initialization finalization GlobalDataInstance.Free; GlobalDataInstance := nil; end. -
10.2 Tokyo unable to report issues from within the IDE
Uwe Raabe replied to Lars Fosdal's topic in General Help
This has been the case for quite a while. The URL points to the defunct QualityCentral. -
RIO - FDMemTable fielddefs design time bug ?
Uwe Raabe replied to Stéphane Wierzbicki's topic in Databases
Indeed! I can reproduce it with IDEFixPack installed. -
RIO - FDMemTable fielddefs design time bug ?
Uwe Raabe replied to Stéphane Wierzbicki's topic in Databases
Cannot reproduce. Datatype dropdown list contains unique values here. -
I wonder how this folder is going to be used as Shared folder. For a non-admin installation that should rather be %APPDATA%\Raabe Software\Shared and not %APPDATA%\Raabe Software\MMX Code Explorer. On the other hand I can imagine some buggy setup scheme from my side. So whatever that registry RootDir entry points to, copy the Indexers folder into that folder and you should be done. I will investigate the setup for any glitches - or better - rethink the folder architecture in general.
-
The Indexer templates are expected in the Indexers sub folder from the shared folder set in registry under HKEY_CURRENT_USER\Software\Raabe Software\Shared\RootDir. It is quite possible that something went wrong during the installation and the indexer files were not copied to that folder. I will check the setup for that.
-
Is it really good practice to create Forms only as needed? Always?
Uwe Raabe replied to Mike Torrettinni's topic in VCL
For these cases I prefer moving the settings to a separate settings class independent from the settings form. Then I can create and initialize an instance of this settings class at startup, load the settings from some storage and adjust with some command line parameters. Then the settings are available all over the application without having to rely on the settings form creation. I often have the case where I need access to the settings long before the main form is created. This would be hard to achieve using the settings form as the central storage for the settings. -
appending to a dynamic array
Uwe Raabe replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
High(x) is implemented as Dec(Length(x)), while Low(x) can already be evaluated by the compiler. High and Length have some execution overhead to check for a nil array, so caching the value might be worth it. -
Travis CI joins Idera
Uwe Raabe replied to Ugochukwu Mmaduekwe's topic in Tips / Blogs / Tutorials / Videos
The time saved by using ContinuaCI and FinalBuilder is worth much more than the cost for these tools - unless you are working for free, though. When comparing prices, don't forget to compare benefits, capability and comfort. Free is never an argument on its own. Oh, and the Solo version of ContinuaCI actually is for free. I tried several times to make use of Jenkins (actually I started with Hudson), but each time I gave up due to the effort necessary to get things done and the maintenance being a bit cumbersome (to speak nicely). So no one can say I didn't give it a chance. ContinuaCI has still room for improvement, no question, but @Vincent Parrett and his team are always open for feature requests and usually amazingly fast when it comes to fixing bugs. -
Where is the "Save Desktop..." menu item in the Delphi 10.3 Rio IDE?
Uwe Raabe replied to PeterPanettone's topic in Delphi IDE and APIs
The unthemed IDE is totally different. BTW, that screenshots somehow reminds me of Delphi 7 (which really makes me shudder). -
Travis CI joins Idera
Uwe Raabe replied to Ugochukwu Mmaduekwe's topic in Tips / Blogs / Tutorials / Videos
Indeed! The time and effort to get a build project up and running (and actually doing what you want!) in ContinuaCI and FinalBuilder beats Jenkins by magnitudes. -
appending to a dynamic array
Uwe Raabe replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Actually, I don't know and, to be honest, I don't care much. Usually there are other places slowing down a program and the gains from rethinking an algorithm or an architecture are probably better targets. -
Where is the "Save Desktop..." menu item in the Delphi 10.3 Rio IDE?
Uwe Raabe replied to PeterPanettone's topic in Delphi IDE and APIs
Well, it doesn't - it stands for Light/Dark Theme and Desktop (at least the rectangle behind it). -
appending to a dynamic array
Uwe Raabe replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Talking about pedantic: The name len is probably misleading, as when it is used in MyArr[Len] it doesn't represent the actual length of the array any more. In contrast MyArr[High(MyArr)] is always correct. Nevertheless, caching the index might be a good idea anyway: It eliminates some checks - and High(x) needs one additional DEC operation compared to Length(x). -
appending to a dynamic array
Uwe Raabe replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
In modern Delphi versions I try to combine record constructors and array concatenation to achieve that: program Project481; {$APPTYPE CONSOLE} type TSomeRec = record SomeField: Integer; public constructor Create(ASomeField: Integer); end; TMyArr = TArray<TSomeRec>; constructor TSomeRec.Create(ASomeField: Integer); begin SomeField := ASomeField; end; procedure Main; var myArr: TMyArr; myRec: TSomeRec; begin myArr := [TSomeRec.Create(0), TSomeRec.Create(1)]; myArr := myArr + [TSomeRec.Create(2)]; Insert([TSomeRec.Create(3)], myArr, 1); for myRec in myArr do begin Writeln(myRec.SomeField); end; Readln; end; begin Main; end. -
Project Magician and Selective Debugging and Delphi 10.3 Rio
Uwe Raabe posted a topic in Delphi Third-Party
Project Magician and Selective Debugging are supporting Delphi 10.3 Rio. https://www.uweraabe.de/Blog/2018/11/23/delphi-10-3-rio/ (with download links) -
Project Magician and Selective Debugging and Delphi 10.3 Rio
Uwe Raabe replied to Uwe Raabe's topic in Delphi Third-Party
Nothing specific. Does it show in the Info - About dialog under Installed Products? Does the Project Magician menu item exist under the Project menu? BTW, the latter will also give you access to the Global settings. -
When IDE Insight suddenly stops working…
Uwe Raabe posted a topic in Tips / Blogs / Tutorials / Videos
… reset the IDE Insight toolbar! When IDE Insight suddenly stops working… -
Delphi 10.3 Rio: Impossible to find entry point "GetProductInfo" under WinXP
Uwe Raabe replied to Silver Black's topic in RTL and Delphi Object Pascal
Exactly! Check Supported Target Platforms: http://docwiki.embarcadero.com/RADStudio/Rio/en/Supported_Target_Platforms -
Include unused class and its RTTI in the executable
Uwe Raabe replied to Attila Kovacs's topic in General Help
In case the compiler can evaluate that condition, that might be an issue, but there are many ways to play on the safe side there. Actually creating and freeing the class may come with some costs, though. -
Include unused class and its RTTI in the executable
Uwe Raabe replied to Attila Kovacs's topic in General Help
That is pretty similar to the original approach described in the topic. In addition, there it is wrapped in a never-true condition to avoid being executed.