Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/25/23 in Posts

  1. Stefan Glienke

    How many people use Delphi?

    "An E-Smart is a pretty fast and comfortable car!" - grandma who only ever drives to the local grocery store.
  2. baka0815

    GExperts Favorites as WP-Plugin

    I'm currently experimenting with the ToolsAPI.WelcomePage API a bit and created a plugin for the GExperts favorites. My current work is a bit hacky, therefore there is currently no patch or something. I include the ToolsAPI.WelcomePage unit in the GX_FavFiles and have a separate type for the plugin there: TGXWelcomePagePlugin = class(TInterfacedObject, INTAWelcomePagePlugin, INTAWelcomePageContentPluginCreator) private FIconIndex: Integer; FView: TFrame; FFavoriteFilesExpert: TFavoriteFilesExpert; public constructor Create(const AFavoriteFilesExpert: TFavoriteFilesExpert); destructor Destroy; override; { INTAWelcomePagePlugin } function GetPluginID: string; function GetPluginName: string; function GetPluginVisible: Boolean; { INTAWelcomePageContentPluginCreator } function GetView: TFrame; function CreateView: TFrame; procedure DestroyView; function GetIcon: TGraphicArray; function GetIconIndex: Integer; procedure SetIconIndex(const Value: Integer); end; The AfterIDEInitialized procedure calls the creation of the plugin via the RegisterWelcomePage method. This does not work on first try, so there is a timer to catch the moment the WelcomePagePluginService is finally availabe. If anyone knows of a different way to register the plugin, please let me know! A dedicated, global "Register" procedure as used for BPL-Plugins didn't work. procedure TFavoriteFilesExpert.RegisterWelcomePage(Sender: TObject); begin // The WelcomePagePluginService might not be initialized the first time we get here, // so try again at a later time. if not Assigned(WelcomePagePluginService) then begin if (not Assigned(FPluginTimer)) then begin FPluginTimer := TTimer.Create(nil); FPluginTimer.OnTimer := RegisterWelcomePage; FPluginTimer.Interval := 2000; end; FPluginTimer.Enabled := True; end else begin FPluginTimer.Enabled := False; if (Assigned(FPluginTimer)) then FreeAndNil(FPluginTimer); WelcomePagePluginService.RegisterPluginCreator(TGXWelcomePagePlugin.Create(Self)); end; end; The welcome page gets the favorites expert as a parameter to be able to access the options (it may be sufficient to just pass the options). Then in the CreateView method I create a TfmFavFiles form and "steal" the tvFolders and pnlFiles objects and change the parent to the plugin view. function TGXWelcomePagePlugin.CreateView: TFrame; var FavFiles: TfmFavFiles; begin if not Assigned(FView) then begin FView := WelcomePagePluginService.CreateCaptionFrame(sPluginID, sPluginName, nil); FavFiles := TfmFavFiles.Create(nil, FFavoriteFilesExpert.FOptions); FavFiles.tvFolders.Parent := FView; FavFiles.pnlFiles.Parent := FView; end; Result := FView; end; This works form me, but is not in a state that I would like to upstream the work, so any input is greatly appreciated!
  3. Renate Schaaf

    VCL-Bitmap rescaler

    A new version is available at https://github.com/rmesch/Repository-R.Schaaf. The parallel resampler can now be used in concurrent threads. You can define more than one thread pool for the resampling and tell the parallel procedure which pool to use. A new demo "ThreadsInThreads" has been added. Initially I had the problem that this demo would sometimes hang waiting for an event, but that has hopefully been fixed. I'd much appreciate a feedback if it still occurs. Thanks, Renate
  4. David Heffernan

    How many people use Delphi?

    That's nice. But plenty of other people are in the situation which you are lucky enough never to have found yourself in.
  5. Renate Schaaf

    VCL-Bitmap rescaler

    It could still work, since the weights only run from -$100 to $100. So a 3-dimensional table would work. Let's try. Edit: No, such a table would just be too big. Edit2: shr 2 doesn't work, because the result of the multiplication could be negative. Thanks for the idea!
  6. Yes, its a false positive, we have like few hundred delphi compiled executables, here's the virustotal link: VirusTotal - File - 871ae239973e56fe9e62ee15bff3cdaec454871c0948db71c1241bca9315477d But ok, it's not a common thing for programs including MARS. thats what i wanted to know.
  7. Renate Schaaf

    VCL-Bitmap rescaler

    Wow, it was indeed very easy, and even the previous link still works! Thanks!
  8. Lars Fosdal

    How many people use Delphi?

    Well, if you work with databases, everything else feels fast 😛
  9. Kazantsev Alexey

    How many people use Delphi?

    Sorry for dirty adaptation spritz_bench.zip
  10. Mike Torrettinni

    How many people use Delphi?

    In some way it would make sense that Delphi developer's salary would go up, due to lack of developers, but I guess lack of demand keeps it pretty low, compared to C#: https://www.ziprecruiter.com/Salaries/Delphi-Programmer-Salary https://www.ziprecruiter.com/Salaries/C-Net-Developer-Salary
  11. Renate Schaaf

    VCL-Bitmap rescaler

    I've implemented this in the new version, but not via a new unit, too much of a can of worms for me right now. Changes to https://github.com/rmesch/Repository-R.Schaaf are now as follows: Threads will no longer be automatically created in Initialization. You can call InitDefaultResamplingThreads to initialize them before you need them, or they will be initialized in the first call of a parallel procedure, which causes a delay. FinalizeDefaultResamplingThreads will free them. If you forget, uScale frees them in Finalization. Source bitmaps with alphaformat=afDefined are now handled correctly, and the target will have the same alphaformat. The resampler works best though with alphaformat=afIgnored. You should define the alphaformat only before display to avoid imprecisions. The unit uTools has routines to transfer a TPngImage or a TWICImage to TBitmap without setting alphaformat=afDefined, which is what TBitmap. Assign alway does in VCL.Graphics (and which is a waste of time for .jpg). A TWICImage is very convenient for fast decoding of .jpg, .png or .tif. Alas TWICImage.Create is not threadsafe, so it needs to be created in the main thread. There is a new TAlphaCombineMode amTransparentColor which preserves the TransparentColor and the regions of transparency upon resampling. The ThreadsInThreads demo now makes thumbnails in 2 concurrent threads, that should be a good crashtest for thread-safety. Cleaned up the code in uScale, moving everything into implementation that is not needed in interface, and added more comments. Also moved 4 almost identical routines into one, sacrificing a bit of performance. I know I should have picked a better name for the repository, but if I change it now, what happens to my three little stars? Renate
  12. David Heffernan

    How many people use Delphi?

    Kind of funny that this site returns a page with a link to the emba site which in turn is a 404. Well, actually it's a 503 but whatever. So even if delphi isn't dead, isdelphidead.com is dead. A meta death if you will.
  13. Lars Fosdal

    Delphi 11.3 is available now!

    I don't disagree, but a lot of dev tools have these issues. Complex software = complex installations.
×