Jump to content

Clément

Members
  • Content Count

    357
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Clément

  1. Hi, I'm compiling a project (Delphi XE) with several millions lines and hundreds of units. Somehow a specific unit got called in that project, and I must discover which unit is dragging it in. It might be a direct reference or indirect reference (Since I'm a very lucky guy, it must be a deep indirect reference). In any case, I have to deal with it. Is there any tool that can help me track a specific unit linkage into a project? TIA, Clément
  2. Clément

    Hunting a unit reference

    The unit I'm tracking does not appear in the graph. If I remove the path or rename the unit the project doesn't compile. I deleted all dcus from the library root to be sure only valid ".pas" files are compiled.
  3. Clément

    Hunting a unit reference

    I will instead create a new DPR project in the "root" , forcing a scan of all sub-folder, including the one I know this library is. My problem is tracking down which unit is dragging "this unwanted unit" in the project. Once I find the "unit responsible for dragging it in the project", I have to assess the best way to remove it from the project. Hopefully removing it from a "uses" clause will be enough, but I don't feel that lucky
  4. Clément

    Hunting a unit reference

    This is driving me nuts... I renamed the unit, the project stopped compiling as expected, but I can track that unit down. I can see it there, still unable to figure out which unit brings it in. I even removed the folder from the IDE environment. The project also stop compiling, but with this time with units it really needs. I am adding those one by one. As I thought it would be simpler to track it down ( stupid me ), I was working in the production .DPR, I had to undo everything, to be able to release a patch to a customer... 🤪 This project uses a very old in-house library (pre-2000) that migrated from Delphi 4 up to XE.
  5. Clément

    Hunting a unit reference

    Very nice tool! But it didn't display the unit I'm looking for. The unit is not directly linked in the project file, instead it is in a folder defined in the IDE environment. I would have to add folders to a list of folders to look for. Is it possible with the latest version you made available?
  6. Clément

    Hunting a unit reference

    I'm using a map file. the unit is there, but I cannot track how it ended up in this project. I wasn't able to install MMX under XE.
  7. Clément

    Hunting a unit reference

    I installed the free edition, ran it, but could'nt figure out how to check the units... I need to spend some more time to figure out if it can help
  8. Hi, I'm using D12 for this project. I'm using VCL Styles, but the same behavior happens without styles. The first icon will call TFileOpenDialog.Execute. During this call, both TitleBarPanel.Caption and the button.caption icon "blink". Why is that? Here's the code: procedure TfrmMain.btnLoadFolderClick(Sender: TObject); begin FileOpenDialog1.Options := [fdoPickFolders]; fLogFiles.edtLogFiles.BeginUpdate; try // Flicking starts if FileOpenDialog1.Execute then begin // Flicking ends var lEncoding := fEncodingList[fCurrentEncodingIndex]; {...} finally end; end; SpeedButtonFlicker.mp4
  9. Clément

    Toolbar + ToolButton + TitleBar flicking

    I'm a lot closer to what I want using VCL Styles. The form is a lot cleaner. I will have to implement a "Style ON / Style Off" for PITA customers. I took 2 screen shots to show you the difference between them. Without styles I would have to handle a lot more "design issues"
  10. Clément

    Toolbar + ToolButton + TitleBar flicking

    Hi.. I added those lines to the main form constructor: constructor TfrmMain.Create(AOwner: TComponent); begin inherited; fLogEngine := TdhsLogViewerEngine.Create; fLogEngine.OnRefreshLines := event_refreshlines; fLogEngine.OnEngineStatus := event_engineStatus; fShowLongField := false; Caption := Application.Title+' v'+strBuildInfoEx+' Beta '; fSearchTextCount := 0; fUpdate := TApplicationUpdate.Create; fEncodingList[1] := TEncoding.ANSI; fEncodingList[2] := TEncoding.UTF8; fEncodingList[3] := TEncoding.ASCII; fEncodingList[4] := TEncoding.Unicode; fEncodingList[5] := TEncoding.BigEndianUnicode; fCurrentEncodingIndex := 2; DoShowStatusBarSearchCount; DoConfigProgressBar; // Bug fixing attempts DoubleBufferedMode := dbmRequested; DoubleBuffered := true; ToolBar1.Transparent := false; Toolbar1.Flat := true; ToolBar1.DoubleBufferedMode := dbmRequested; Toolbar1.DoubleBuffered := true; end; I manually checked that every property is assigned properly. Still no joy
  11. Clément

    Toolbar + ToolButton + TitleBar flicking

    Thanks for your suggestion. Unfortunately toggling properties "Transparent", "Flat", "Ctl3D", "HideClippedBUttons" lead to the same behavior. Even tried "StyleELements := []; " with no luck. I set Toolbar.Stylename := 'Windows' to use both styles, but sill no joy. Under Windows 11 the only way is 100% native.
  12. Clément

    Toolbar + ToolButton + TitleBar flicking

    "In the realm of coding, a tempest shall brew a buggy IDE, causing much ado. Programmers´ patience tested, their sanity tried, as they navigate errors, with nowhere to hide." -- NostraGPTamus
  13. Clément

    Toolbar + ToolButton + TitleBar flicking

    Is there a way to file a Bug report so Embo can take a look at it? This bug is duplicated and might solve other problems with VCL Styles in windows 11.
  14. Clément

    Toolbar + ToolButton + TitleBar flicking

    yes. I'm windows 11
  15. Clément

    Toolbar + ToolButton + TitleBar flicking

    I'm using the VCL Style in this sample. As is, you click the open folder button (first one) to see the blink. If you change the VCL Style to "Windows" and recompile, the button will no longer blink, only the Titlebar. If you remove VCL Styles and titlebar, it behaves as expected. Blink_Sample.zip
  16. Clément

    Toolbar + ToolButton + TitleBar flicking

    I tested once more removing VCL Styles with the new code ( using postmessage) and the flick stopped completely. Going native!
  17. Clément

    Toolbar + ToolButton + TitleBar flicking

    I'm debugging VCL.Dialogs and the components flickers in the line below: {$IFDEF CLR}[UIPermission(SecurityAction.LinkDemand, Window=UIPermissionWindow.SafeSubWindows)]{$ENDIF} function TCustomFileDialog.Execute(ParentWnd: HWND): Boolean; const CDialogOptions: array[TFileDialogOption] of DWORD = ({... }); var LWindowList: TTaskWindowList; {... } begin if Win32MajorVersion < 6 then raise EPlatformVersionException.CreateResFmt({$IFNDEF CLR}@{$ENDIF}SWindowsVistaRequired, [ClassName]); Result := False; {...} // Show dialog and get results DoOnExecute; LWindowList := DisableTaskWindows(ParentWnd); LFocusState := SaveFocusState; SaveHooks := TStyleManager.SystemHooks; TStyleManager.SystemHooks := []; try LDialogEvents := TFileDialogEvents.Create(Self); Advise(LDialogEvents, LAdviseCookie); if (fdoPickFolders in FOptions) and (Win32MajorVersion = 6) and (Win32MinorVersion = 0) then // Vista and Windows Server 2008 bug OnFolderChange := SaveActualFolder; try Result := Succeeded(Show(ParentWnd)); // ## Line 4941 caption goes bananas if Result then Result := Succeeded(GetResults); finally Unadvise(LAdviseCookie); end; finally EnableTaskWindows(LWindowList); SetActiveWindow(ParentWnd); RestoreFocusState(LFocusState); TStyleManager.SystemHooks := SaveHooks; end; end; finally FDialog := nil; end; end; If I remove Titlebar component, only the Toolbutton flicks... Should I drop TToolbar / TToolbutton for a Tpanel / TSpeedButton ? 😞 (It's easier to replace those two then create a new file dialog from scratch) Edit: I just tested with Tpanel/TSpeedButton and the button icon also disappears.
  18. Clément

    Toolbar + ToolButton + TitleBar flicking

    I modified my code completely, but still the same behavior persists: function TfrmMain.DoGetFolder( var aFoldername : String ) : Boolean; begin FileOpenDialog1.Options := [fdoPickFolders]; try Result := FileOpenDialog1.Execute; if Result then aFoldername := FileOpenDialog1.FileName else aFoldername := ''; DoUpdateStatusBar([sabasePath],[aFoldername] ); finally FileOpenDialog1.Options := FileOpenDialog1.Options - [fdoPickFolders]; end; end; procedure TfrmMain.DoLoadLogFilesFromBaseFolder; var lBaseFolder : String; begin if DoGetFolder( lBaseFolder) then begin DoReadFolders( lBaseFolder, fEncodingList[fCurrentEncodingIndex] ); DoUpdateLogFilesBrowser(lBaseFolder); DoReloadLogFiles; end; end; procedure TfrmMain.btnLoadFolderClick(Sender: TObject); begin PostMessage(Handle, _UM_MAINFORM_DELAYEVENT , 0 , _UP_MAINFORM_LOADFOLDER); end; procedure TfrmMain.btnLoadFilesClick(Sender: TObject); begin PostMessage(Handle, _UM_MAINFORM_DELAYEVENT , 0 , _UP_MAINFORM_LOADFILES); end; procedure TfrmMain.msg_MAINFORM_DELAYEVENT(var aMsg: TMessage); begin aMsg.Result := 1; case aMsg.LParam of _UP_MAINFORM_LOADFOLDER : DoLoadLogFilesFromBaseFolder; _UP_MAINFORM_LOADFILES : DoLoadLogFilesFromFileList; else aMsg.Result := 0; end; end; The idea here is to let the button animation happen, and then execute TFileOpenDialog.Execute. But still, when TFileOpenDialog.Execute is called, both titlebar and Toolbutton flickers.
  19. I mostly work with a traditional setup. Ex: 3 Physical Machines: One server ( Windows Server ), and Two Workstation ( Windows 10 ). I'm considering hosting everything in a single new machine, and I'm still studying the options I will use the 3 VM machines at the same time. One Windows Server ( PDC ) One Windows 11 workstation must be part of the domain. One Windows 11 Workstation not in the domain! (This machine will be use to connect to my customers via VPN or whatever they require ) In my case, one possibility would be to have as Host OS a Hyper-V server ( Free ! ) Any of you using Hyper - V server ( or any other )? Does delphi installs and works fine? How about Dongles ( code signing, etc ), would they work on a VM with these settings? I 'm using two dongles: One for code signing , One to digitally sign my invoices. Does allowing USB-passthrough works for you? Today I configured my IDE to sign and deploy the installers to my website. This must continue to work this way.
  20. I just installed the patch I downloaded from Getit without any issues.
  21. Using SQL then might also work. Table (Ranges) with fields loRange HiRange Value The SQL would be very simple: Select value from ranges where :elem between loRange and HiRange Since your ranges are unique you can create a unique index for loRange, hiRange Should be very easy to maintain and would handle millions of row.
  22. How low is you range. Can you use a simple array? A[1]:=1; A[2]:=1; A[3]:=1; ... A[7]:=-1; // Non existing range ... A[102]:=2; A[103]:=2; .... A[149]:=2; A[150]:=2; All elements must have a value.
  23. Clément

    Python <-> Delphi

    Hi, (I will use Delphi Athens for this project) This project started as 100% python, but the developer had some problems calling "Edge Browser" from Python. I know this is a out of topic, but is there a way to call and interact with Edge Browser directly from Python. By interact, I mean using DOM, executing scripts , getting results to keep running the script. I know I can interact pretty well with Edge Browser from Delphi. Most of these requirements are met. But there's a lot of python code I just don't have time (nor knowledge) to translate to Delphi.... I believe there's two choices: 1) Create a delphi module to be called from python (using ctypes). This module would call edge and serve as a bridge between python and the browser. 2) Execute the whole thing from delphi using P4D. I honestly don't have a clue what challenges I will face from either solution. Could someone shed some light? Is there a sample or demo I could study? TIA, Clément
  24. Clément

    TCP ping

    Hi.... I using ICS9.x with D12. My application (dhsPinger) have to ping several devices on a LAN. Today I using a thread pool to ping, works nicely. I would like to implement TCP ping using ICS and I was wondering if it's possible. All I need is to know if there's a device on the other side. A device can be any device that can be attached to a LAN. Would if be possible to discover any device via TCP ping or some devices would be undectected? Would there be any cons ? TIA, Clément
  25. Clément

    TCP ping

    For some devices a TCP connection is required, and I can send 1 or 2 bytes to trigger a response. In this case, for these devices, ICMP is disabled. dhsPinger allows to create a "device type" and choose the ping technology. You have the option to send bytes to trigger an answer.
×