Leaderboard
Popular Content
Showing content with the highest reputation on 02/03/21 in all areas
-
For all who want to try to get the DDevExtensions Delphi IDE plugin to work with Delphi 10.4 can now clone the DDevExtensions git repository. It contains the project files for Delphi 10.2 and 10.3. I'm not able to help with any Delphi 10.4 issues, so you are on your own. GitHub repository: https://github.com/ahausladen/DDevExtensions
-
kuLibrary is a set of components and modules from Gorkun Grigory useful for programming in Delphi. Includes: sait: http://kuzduk.h1n.ru/_kulibrary.html download: https://yadi.sk/d/9RMDpE3X3PvvV9 New corrected link: https://kuzduk.ru/delphi/kulibrary kuShellListView Component explorer. Analogue of TShellListView, which was cut from the Delphi component palette after version 7. It's a pity! Nice and helpful component! kuShellListView repeats TShellListView and has many nice additions like Drag & Drop. kuEditPath Delphi component for working with addresses: 1) Highlights the intermediate folder between the slash separators that you hover over. 2) When you click with the mouse wheel (middle button) on an intermediate folder, this intermediate folder opens in the associated component-explorer kuShellListView kuLabelLink Component for working with links. For example: author's site, write a letter, go to the folder ... Click on any link specified in the Link property kuFontDialog Font selection dialog. More simple and straightforward than the standard factory one. kuShellDialog Dialogue for selecting folders and files. Replaces the standard OpenDialog and allows you to select not only files, but also folders. kuDrag Delphi module, adding which you can drag files FROM your program to other applications. You can, for example, drag a file from your program to Explorer. kuDrop Delphi module, adding which you can drag and drop files into your program. You can, for example, drag and drop a file from Explorer into your program. kuLanguageUni Delphi module providing methods for translating your program into other languages. kuTray Delphi module containing methods for minimizing your program to tray (notification area). This module also contains a description of the TkuForm class - a form that has the CloseToTray property - when you click the [x] button in the title of such a form, the application is minimized to tray. kuModul Delphi module contains many useful general purpose functions and procedures for all occasions. kuShell Delphi module for working as a conductor: copy cut and paste to / from the clipboard, open applications through your program, write a letter, open a link in a browser.
-
So don't use shared dcu output folders. You shouldn't be doing that anyway.
-
I got bitten by an interface!
Remy Lebeau replied to Clément's topic in Algorithms, Data Structures and Class Design
Which is perfectly fine. This is not a side effect of Supports() itself, but rather is due to your mismanagement of your interfaced object. Your TMyFrame class has reference counting enabled on it, but your fBaseClass member is not maintaining an active interface reference to the object, so the object has an initial reference count of 0 instead of 1, and then your cast to ISupportTask increments the reference count to 1 instead of 2, and then releasing that ISupportTask decrements the reference count to 0 instead of 1, freeing the object. As Dalija said, you need to change this line: fBaseFrame : TBaseFrame; To this instead: fBaseFrame : IInterface; And then this change this: procedure TForm22.FormDestroy(Sender: TObject); begin fBaseFrame.Free; end; To this instead: procedure TForm22.FormDestroy(Sender: TObject); begin fBaseFrame := nil; end; Or, simply get rid of the OnDestroy handler completely, since the fBaseFrame member will be finalized anyway then the TForm22 object is destroyed, releasing the reference for you. And, as David mentioned, you should change this: procedure TForm22.Button1Click(Sender: TObject); begin if Supports( fBaseFrameClass, ISupportTask ) then (fBaseFrame as ISupportTask).CheckTask; end; To this instead: procedure TForm22.Button1Click(Sender: TObject); var Task: ISupportTask; begin if Supports( fBaseFrame, ISupportTask, Task ) then Task.CheckTask; end; -
I got bitten by an interface!
Remy Lebeau replied to Clément's topic in Algorithms, Data Structures and Class Design
You could do that, but that is not a very good design choice. You would have to remember to always update BOTH references when updating EITHER reference. That risks the two references getting out of sync. If you absolutely need access to TMyFrame members that are not accessible via interface methods (which kind of defeats the purpose of using interfaces), you can always type-cast an interface back to TMyFrame when needed (D2010+), eg: var Intf: ISomeInterface; Intf := TMyFrame.Create; ... Use (Intf as TMyFrame).SomeMember as needed... ... -
Multilanguage site it good idea but i have no time to do it. So as a the simplest solution is google translate: https://translate.google.com/translate?hl=&sl=ru&tl=en&u=http://kuzduk.h1n.ru/_kulibrary.html - Putin approves!
-
My build server runs all builds in parallel. I don't do it locally as I don't need to build more than one project at a time there.
-
Did you rename the fast compilers to replace the original ones?
-
For iOS: StartUp\Documents\ For Android: .\assets\internal Use those folders if you deploy an existing DB. This is the Project Options section. At runtime you can use something like this {$IF DEFINED(iOS) or DEFINED(ANDROID)} FDConnection.Params.Values['ColumnMetadataSupported'] := 'False' ; FDConnection.Params.Values['Database'] := TPath.Combine(TPath.GetDocumentsPath, 'mydb.sqlite') ; {$ENDIF} Then do whatever you need to create/open/update, etc...
-
@kuzduk Well, I think you do not understand. Putting software in a language (text) many of us do not understand make them useless. Many of the people using Delphi use it in English. Making software with non-English text in it makes life difficult since one has to translate all text. As for your site, I could not translate. So 2 advice, if you want some to use your components Site in English, text in components in English. Otherwise, maybe Puttin can use it.
-
I got bitten by an interface!
Gustav Schubert replied to Clément's topic in Algorithms, Data Structures and Class Design
Quick fix: keep both. TForm22 = class(TForm) procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private FBaseFrameClass: TBaseFrameClass; { hold on to both } FBaseFrame: TBaseFrame; // object reference FBaseFrameInterface: IInterface; // interface reference end; procedure TForm22.FormCreate(Sender: TObject); begin ReportMemoryLeaksOnShutdown := True; { Happy mixing is possible! } fBaseFrameClass := TMyFrame; FBaseFrame := FBaseFrameClass.Create; FBaseFrameInterface := FBaseFrame; end; procedure TForm22.FormDestroy(Sender: TObject); begin // fBaseFrame.Free; end; -
Micro optimization: use Pos before StringReplace
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I did -
I don't know about you, but I use the best tool for the job, not the best tool written in Delphi!
-
Ann: TsiLang Components Suite v7.8.5 - complete localization solution!
Igor Sitikov posted a topic in Delphi Third-Party
Hello, We're glad to announce the release of TsiLang Components Suite 7.8.5! Simple and powerful localization solution for software developers. It's virtually impossible to find popular software that would not be translated (localized) into multiple languages. In fact, even niche and second-tier developers localize their products to increase international sales. Unfortunately, the process of software localization is both time consuming and very expensive. Luckily, developers who use RAD Studio, Delphi or C++Builder platform can use TsiLang Components Suite to localize their software for worldwide distribution for a fraction of the usual costs. TsiLang Components Suite brings you the complete and universal solution to create easy and fast multi-language or localized applications for ALL target platforms! In the new version, we have improved Translations Editor and TsiLang Expert. Updated wizards and TsiLangCombo component. In addition, SIL Editor and Dictionary Manager were improved as well. Description of the new features and improvements available at: https://www.tsilang.com/whats-new/ Detailed description of TsiLang Components Suite is available at https://www.tsilang.com You can download a fully functional and no time-limit version from https://www.tsilang.com/download-tsilang-components-suite/ -
I got bitten by an interface!
Dalija Prasnikar replied to Clément's topic in Algorithms, Data Structures and Class Design
You are experiencing classic issue of "mixing objects and interfaces" Your TBaseFrame class has enabled reference counting and you are using it like normal class. You should store it in interface reference - fBaseFrame: IInterface (or whatever other interface type suits you the best) and you should not call Free on it (you cannot call it on interface, but point is that its memory will be automatically handled so you don't have to worry about it) https://dalijap.blogspot.com/2018/03/dont-mix-objects-and-interfaces.html -
Micro optimization: use Pos before StringReplace
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Up to ~XE7 StringReplace is piece of straightforward dumb slow code. Later they optimized it pretty well. -
Micro optimization: use Pos before StringReplace
Virgo replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
So it is different in different Delphi versions.... In Delphi XE StringReplace does not use Pos... Instead it uses SysUtils.AnsiPos. But on possible reasons why on negative cases (search string is not found) StringReplace is slower to return then checking with Post before (just in case sensitive version and on Delphi XE): Multiple functions calls to find position of search string (StringReplace->AnsiPos->StrPosLen->StrLComp String concatenation always.