Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/13/21 in all areas

  1. Dalija Prasnikar

    community.embarcadero.com's forums

    NNTP forums were the only ones that were really used. They were not shut down and deleted on a whim, but because of software and database problems. Posts were purged in attempts to stabilize and salvage the forums, but failures keep happening. During that time Embarcadero created new web only forums, but they were never extensively used - I am not going to analyze why.... Well, now you have Delphi Praxis for that. Old forums as such may be lost, but community is not. Many people are here and that is all that matters.
  2. As a workaround you can disable the toolbar in Pascal Expert Options. You might configure some shortcuts instead.
  3. Doesn't work well on this project - feel free to analyse my code and tell me what I did wrong 😉 https://github.com/DelphiPackageManager/DPM If the code is too complex for the tooling, then the tooling needs improving, valid compiling code should not be a problem.
  4. Pat Foley

    How to compare performance between Delphi versions?

    I run 10.3 together with 10.4.1 and now 10.4.2. 10.2 seems old school
  5. FredS

    community.embarcadero.com's forums

    Not really, that searchable data had huge value. Most weird issues/errors had many iterations of fixes and additional information. Certainly while stuck with several of those over the years a quick search was all that was needed.. its the difference between a few minutes and an extended pause..
  6. Remy Lebeau

    INDY UDP broadcast to a specific Network

    If the OS can broadcast to multiple subnets using a single socket bound to local IP 0.0.0.0, then so be it. I just know that hasn't always worked that way. But maybe things are better in recent years. If there are multiple adapters installed, and you know what IP they are assigned, you can bind a separate socket to each one directly, eg: FUDPServer.Active := False; FUDPServer.Bindings.Clear; ... for I := 0 to FNetworksList.Count - 1 do begin with FUDPServer.Bindings.Add do begin IP := FNetworksList[I].LocalIP; Port := 5001; end; end; ... FUDPServer.BroadcastEnabled := True; FUDPServer.Active := True; This way, if you then Send...()/Broadcast() on any given Binding, it will send out only to that specific adapter/subnet directly, rather than the OS having to hunt around the routing tables to figure out which adapter/subnet to send out to, as is the case when calling Send...()/Broadcast() on a single Binding that is bound to 0.0.0.0. Operating Systems are pretty good at maintaining good routing tables, but they are not infallible. Sometimes routes are not configured properly, or get corrupted over time. So sometimes it may be easier/better to just be more direct and cut out the middle man.
  7. pier

    Window hooking

    In case somebody is interested this is how I managed to nicely integrate matplotlib figures inside my delphi app. 1) the pythons script shows the plot with "plt.show(block=False)" 2) this is the code which executes the script and embeds the plot procedure TForm1.Button1Click(Sender: TObject); var plotwnd:HWND; begin PythonEngine1.ExecStrings( Synedit1.Lines ); plotwnd:=Findwindow(nil,'Figure 1'); if plotwnd<>0 then begin Windows.SetParent(plotwnd,(PageControl1.Pages[1] as TTabSheet).Handle); SetWindowLong(plotwnd, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) and not WS_BORDER and not WS_SIZEBOX and not WS_DLGFRAME ); showwindow(plotwnd,sw_showmaximized); setforegroundwindow(plotwnd); end; end; the plot is displayed inside a tabsheet which has an event handler to automatically resize the plot procedure TForm1.PlotResize(Sender: TObject); begin movewindow(plotwnd,0,0,(PageControl1.Pages[1] as TTabSheet).Width,(PageControl1.Pages[1] as TTabSheet).Height,True); end;
  8. balabuev

    TTreeNode leak when VCL styles are active

    Not really works, because enqueued via ForceQueue tasks are not executed after the main form close. So, need to replace it with some explicit implementation: type TScrollingStyleHook = class(TMouseTrackControlStyleHook) public type //... TAsyncDeletion = class private class var FItems: TList; class procedure FreeItems; public class destructor Destroy; class procedure FreeAsync(O: TObject); end; //... end; class destructor TScrollingStyleHook.TAsyncDeletion.Destroy; begin TThread.RemoveQueuedEvents(nil, FreeItems); FreeItems; end; class procedure TScrollingStyleHook.TAsyncDeletion.FreeAsync(O: TObject); begin if FItems = nil then begin FItems := TList.Create; TThread.ForceQueue(nil, FreeItems); end; FItems.Add(O); end; class procedure TScrollingStyleHook.TAsyncDeletion.FreeItems; var itm: TObject; begin if FItems <> nil then begin for itm in FItems do TObject(itm).Free; FreeAndNil(FItems); end; end; This version works fine.
×