Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 10/10/24 in all areas

  1. hsvandrew

    SplashForm freeze

    The Delphi VCL is not multi-threaded. The code that's running to create all those forms will block code like your animation from working. Its rarely a good idea to actually 'create every form' on startup like this. I know that's how Delphi does it, but its less than ideal. App startup will either be slow because You have some code running in an initialization section somewhere, either in your code or the many libraries you may be using. You have a database connection on a form, perhaps to a database that may not be connectable, and this is causing a delay until it times out when creating a form Generally I would suggest these principles: Create forms when they are first used rather than at startup or during an idle stage when the user won't notice Move operations that aren't VCL/drawing related into threads, allowing the UI to still update whilst they run i.e. disk operations, database operations etc If these things don't work, even though it will have other impacts, you could consider creating a launcher app that shows the splash screen whilst then launching the real app. This will cause a few issues with taskbar/icons etc, but maybe a solution for a very slow startup that can't otherwise be coded around with the above 2 suggestions. Delphi can sometimes encourage people to create enormous forms with thousands of components. This is the only reason I can think of in a modern computing environment other than an IO delay for any noticeable 'load time' during creation of forms on startup.
  2. I invite you to visit the bug tracker for any of Atlassians products (Jira, Confluence, Bitbucket, etc) and look at some of the existing requests. But leave all hope behind before you enter; The most popular requests, be it bug reports or enhancement requests, are often also the oldest - and we're talking decades. For example the request to have Confluence links open in a new window, a feature provided by just about every other web documentation tool, was rejected after almost 20 years of bad excuses. "Buy a third party solution" is their current stance. Unless a change directly translates to an increase in income then Atlassian doesn't give a sh*t if the request is reasonable. They survive on the sunken cost fallacy.
  3. Please see the blog post and watch the videos! Although the videos show PyScripter, the underlying editor control is SynEdit. Note: Development of SynEdit has moved back to pyscripter/SynEdit: SynEdit is a syntax highlighting edit control, not based on the Windows common controls. (github.com) for the reasons explained here. The multi-caret developments are in the multicaret branch, which will be merged to master after a period of testing. It is quite solid, but if you would like to try and help iron out bugs, that would be much appreciated.
  4. I use Sqlite in several applications. I came across a simple little interface years ago from a Yury Plashenkov (https://github.com/plashenkov/SQLite3-Delphi-FPC)) and I thought it was simple and brilliant. Awhile later, I created my own based on Yury’s style, but taking advantage of some modern Delphi language features like interfaces and anonymous methods plus other goodies. (Yah, I read Nick Hodges book and needed something to do.) My version is on GitHub at (https://github.com/rgdawson/Rgd.Sqlite3) for anyone interested. The other day, it dawned on me that I could statically link the Sqlite3 binary into the exe quite easily, which was a surprise to me. Just include the unit FireDAC.Phys.SQLiteWrapper.Stat and presto, the Sqlite3 binary is statically linked and no more need to distribute sqlite3.dll with my project. As of Delphi 12.2, the version of Sqlite is 3.46.0. (I never tried this before Delphi 12, so YMMV) I use only the Pro version of Delphi, which does not include the source code to FireDAC, but I was able to include the unit and just let the IDE’s editor hints show me the function prototypes, like so: I had gotten used to compiling my own version of Sqlite, leaving out features I didn’t need to make it smaller/faster. And yes, you lose that ability when you statically link Delphi’s FireDAC version, which is not customizable and has every feature built in it. But any speed differences appear negligible to me, and I’ll trade having a bigger exe for the simplicity of a single executable file. Anyway, I'm sure many of you already knew how to do this and are thinking "big deal" , but I didn't. (I'm not a big FireDAC user.) This sort of made my day today being able to statically link Sqlite3 without using FireDAC for my access layer. I’d thought I’d share.
  5. Dalija Prasnikar

    SplashForm freeze

    Your problems is that you are trying to show splash form after all other forms are created. You should show it immediately upon construction. BEGIN Application.Initialize; Application.Title:= 'My Slow App'; FormSplash:= TFormSplash.Create(Application); FormSplash.Show; Application.CreateForm(TFormMain, FormMain); Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm3, Form3); Application.CreateForm(TForm4, Form4); Application.CreateForm(TForm5, Form5); FormSplash.Free; // FormSplash is no longer needed Application.Run; END. There is also no point in having empty try...finally block, it serves no purpose. If construction of any of the forms fails, the application will just terminate. You could add some error handling in such case, but that is another story. You should not use FormSplash variable anywhere else after you call Free on it as it will be a dangling pointer. That should not be too much of an issue since it is only a splash form and it is not supposed to be used anywhere else. Otherwise you would have to use FreeAndNil(FormSplash) to be sure that reference is niled when object is gone and the variable is still accessible to other code.
  6. Lol, we had to do the same migration at our company, complained to Atlassian that cloud Jira is super slow compared to old hosted one, their response - our code is very big and complex you should get a faster computer. And our company is much bigger than Embarcadero. Jira is dominating the market and there is no easy migration to something else, there is no reason for them to do anything right now.
  7. To be fair not much they can do, Atlassian blackmailing everyone to move to cloud based Jira, so they have to use inferior system as customer facing.
  8. They probably thought that 2047 was "enough for everybody" and didn't think of it as a limit, so they didn't impose a limit on WriteString either. But we can only guess. OTOH nobody(*1) uses TIniFile any more but TMemIniFile because it overcomes all the limitations of Get/SetPrivateProfileString so that's a moot point. (*1 for suitable definitions of nobody )
  9. François T

    DUnitx and array

    Hello to all, I'm new to DUnitx. We are introducing UnitTesting in our legacy project since 3 month. I'd like to test a function having a opened array as parameter. It's not possible directly with TestCase as I read. I didn't succeed with TestDataProvider. What is the best way to do that ? The function I'd like to test function IsXXX(const aCurrentXXX: word; const aYYY: word; const aXXXArray: array of boolean): boolean; begin result := ((aYYY in AA_GRP) or ((aYYY in BB_GRP) and ((Length(aXXXArray) >= aCurrentXXX) and aXXXArray[aCurrentXXX]))); end; any help will be wellcome, François
  10. I’m working on a project using Material 3 Design in Delphi FireMonkey for Athens 12.2. With Skia now integrated in Athens 12.2, we have a similar graphics foundation to Flutter, but we still need a powerful UI component suite to fully unlock Delphi’s design potential. I’ve been using Alcinoe to customize components like Text, Buttons, Switches, TrackBars, etc., into Material 3 Design or even Cupertino style—whatever fits the design. You can easily manage different states like hover, pressed, or disabled directly through the object inspector, which makes it super easy to work with in Athens 12.2. For more info on Alcinoe and Material 3 controls for Delphi, you can check it out here: Material 3 Controls for Delphi – A Modern UI Approach 3. I’ve put together a demo app specifically for Athens 12.2, and I’d really appreciate it if you could test it and give me your feedback. Here’s the link to the demo: https://play.google.com/apps/internaltest/4701314002613599109 To get the app on Google Play, I need around 20 testers. If you’re interested, please send me your Android Gmail address, and I’ll invite you to give it a try. Thanks a lot for your help!
  11. I've added "Embarcadero Customers" to sharing, so hopefully this helps.
  12. The following worked fine for me: procedure TForm1.Button1Click(Sender: TObject); begin PermissionsService.RequestPermissions(['android.permission.READ_EXTERNAL_STORAGE', 'android.permission.WRITE_EXTERNAL_STORAGE'], procedure(const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>) begin // NOTE: I am assuming the user granted permission, here! CreateFolder; end ); end; procedure TForm1.CreateFolder; var fn: string; begin fn := TPath.Combine(TPath.GetSharedDocumentsPath, 'OLA'); ForceDirectories(fn); if TDirectory.Exists(fn) then Button1.Text := 'OK' else Button1.Text := 'Failed'; end; Delphi 10.4.1, Android 11 device (Pixel3a)
×