Jump to content

PeterPanettone

Members
  • Content Count

    1354
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by PeterPanettone

  1. You are right. I will add an explaining hint to the StatusBar, so anybody capable of moving the mouse pointer over the StatusBar can see this explanation. If anybody wishes it I could even add a clickable INFO or DROPDOWN icon to the StatusBar.
  2. For an experienced computer user (and for developers in general), this should be pretty clear: • "Copy this TEXT" copies the TEXT on the StatusBar to the Windows clipboard and then can be PASTED into a text editor or into the IDE Source Code Editor. I deliberately used the wording "TEXT" (and not "path") because in the future the UCM StatusBar could contain other text types and not only file-paths. A very useful feature. • "Copy this FILE" copies the selected unit FILE to the Windows clipboard and then can be pasted (e.g. with CTRL-V) as a FILE into Windows Explorer (or your custom File Manager). A very useful feature. I am planning to implement this soon. Of course, if the StatusBar does not contain a path to an existing file, then this menu item will be disabled. This has already been implemented. You can see that the wording of the menu items was carefully selected for SPECIFIC SENSIBLE REASONS.
  3. If you configure the Uses Clause Manager to use the map file to build the list of Project Units in a Windows 64-bit program then the list of Project Units does not contain the units from the map file: It contains only the list of units from the project file (.dpr). I have investigated the problem and found out that the compiler generates a different map file with 32-bit programs and with 64-bit programs respectively: • 32-bit programs: The ACBP alignment denomination is used • 64-bit programs: The ALIGN alignment denomination is used I will now fix this bug in GExperts and post a patch here.
  4. • Fixed a bug: The context popup menu of the Units List was not available in the Identifiers tab.: • Improved the context popup menu of the Units List: • Added new menu item Copy this Identifier to the Clipboard only to the Units-List context menu of the Identifiers tab • Added new icons to the Units-List context menu Please download this newest version: GX_UsesExpert5.zip
  5. Fixed another small bug: If the selected UnitFilePath does not exist (not GxOtaTryFindPathToFile) then the StatusBar text was not cleared. Please download this newest version: GX_UsesExpert4.zip
  6. Fixed a small bug: The StatusBar context menu was shown (on right-click) even if there was no text in the StatusBar. Please download this newest version: GX_UsesExpert3.zip
  7. I have added a context popup menu to the UCM StatusBar: Here are the changed sources: GX_UsesExpert2.zip
  8. In Uses Clause Manager, double-clicking a unit item in the units list of any tab (except Identifiers) adds the double-clicked unit to the implementation uses clause. This functionality is still missing in the Identifiers tab in r2832, so I added it by adding the lbxAvailDblClick event handler to sg_Identifiers: Thomas, can you please commit this. Thank you! Here is the link to to the feature request: https://sourceforge.net/p/gexperts/feature-requests/81/
  9. Now the GExperts UCM MapFile-based ProjectUnitsList works for the Win32 platform and for the Win64 platform. Anybody is invited to add other platforms. BTW, thanks to Thomas for the Uses Clause Manager which is a very good idea!
  10. Done: In \Source\Utils\GX_dzMapFileReader.pas, the original TMapFileReader.ParseSegments method is as follows: procedure TMapFileReader.ParseSegments(_StartIdx: Integer); var i: Integer; s: string; p: Integer; begin for i := _StartIdx to FContent.Count - 1 do begin s := FContent[i]; if s = '' then Exit; if TryCutAt(' M=', s) then begin p := Pos(' ACBP=', s); if p > 0 then begin s := Copy(s, 1, p); s := Trim(s); FUnits.add(s); end; end; end; end; Replace it with this code: procedure TMapFileReader.ParseSegments(_StartIdx: Integer); const StrACBP = ' ACBP='; StrALIGN = ' ALIGN='; var i: Integer; s: string; p: Integer; AlignStr: string; begin //CodeSite.Send('TMapFileReader.ParseSegments: AlignTest START'); p := Pos(StrACBP, FContent.Text); if p > 0 then // 32-bit platform AlignStr := StrACBP else begin p := Pos(StrALIGN, FContent.Text); if p > 0 then // 64-bit platform AlignStr := StrALIGN else EXIT; end; //CodeSite.Send('TMapFileReader.ParseSegments: AlignTest END'); // time not measurable for i := _StartIdx to FContent.Count - 1 do begin s := FContent[i]; if s = '' then Exit; if TryCutAt(' M=', s) then begin p := Pos({' ACBP='}AlignStr, s); if p > 0 then begin s := Copy(s, 1, p); s := Trim(s); FUnits.add(s); end; end; end; //CodeSite.Send('TMapFileReader.ParseSegments: FUnits-List at end of ParseSegments', FUnits.Text); end;
  11. "A Shell link is a data object that contains information used to access another object in the Shell's namespace": Read the whole definition here: https://docs.microsoft.com/en-us/windows/win32/shell/links I was searching for a Delphi VCL library allowing me to easily create a Shell-Link with all properties described in the Microsoft documentation: https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ishelllinkw I found a lot of libraries for this purpose, but most of them were outdated or had some flaws or bugs. Most of the libraries lacked the feature to create a Shell-Link with a Hotkey. The ShellBrowser Delphi VCL Library from JamSoftware contains a method to easily create a Shell-Link: https://www.jam-software.com/shellbrowser_delphi/index.shtml Unfortunately, it has no easy method to configure the properties (especially the hotkey property) of the newly created Shell-Link. Fortunately, the above mentioned Microsoft documentation provides all the information to succeed in the task: I use a standard THotKey control in the UI to allow the user to configure a hotkey for the newly created Shell-Link: The THotKey control has these main properties - HotKey and Modifiers: So the whole process of creating the Shell-Link with the Hotkey properties can be achieved with these steps: 1. Get the ItemIdList of the created Link: 2. Provide the IShellLink Interface of the ItemIdList: 3. Declare the IPersistFile interface for the Shell-Link file: 4. Now we need (as mentioned in the Microsoft documentation) to store the virtual key code in the low-order byte and the modifier flags in the high-order byte of the Shell-Link Hotkey property. For this purpose we declare a record containing two byte-fields: Then we get the Hotkey from the THotKey control, assign it to the record and typecast the record to a Word: But the Modifiers value is still missing from the record. So next, we get the Modifier-keys from the THotKey control and assign them to the Modifier Byte of the record: Now we can assign the record (again typecasted to a Word) to the Shell-Link interface: 5. The other Shell-Link properties are easy to set and are explained in the Microsoft documentation. 6. In the last step we can now save the configured Shell-Link: You can download the source code and learn from its implementation: ShellLinkShortcutTest.zip Here is a compiled exe demo of the program: ShellLinkShortcutTest_CompiledExeDemo.zip To compile the source code yourself you need the ShellBrowser library. You can download a free trial version here: https://customers.jam-software.de/shellbrowser_delphi/download.shtml?language=EN The many other features of the ShellBrowser library are explained here: https://www.jam-software.com/shellbrowser_delphi/features.shtml I am not affiliated with JamSoftware, but I recommend the ShellBrowser library as an excellent product. I wish you a lot of fun with this demo!
  12. PeterPanettone

    Creating a Shell-Link with hotkey property

    I just tried to use the linked unit. This has nothing to do with what I want. Sorry about that.
  13. PeterPanettone

    Creating a Shell-Link with hotkey property

    Confirmed.
  14. PeterPanettone

    Creating a Shell-Link with hotkey property

    Loading a Shell-Link and reading its properties does not work with the above code:
  15. PeterPanettone

    Creating a Shell-Link with hotkey property

    Unfortunately it does not work:
  16. PeterPanettone

    Creating a Shell-Link with hotkey property

    Compiler (Delphi 10.3.1 Rio) unfortunately found these errors in the code: [dcc32 Error] ShellLink.pas(93): E2188 Published property 'ItemIDList' cannot be of type POINTER [dcc32 Error] ShellLink.pas(274): E2033 Types of actual and formal var parameters must be identical [dcc32 Error] ShellLink.pas(337): E2033 Types of actual and formal var parameters must be identical [dcc32 Error] ShellLink.pas(338): E2033 Types of actual and formal var parameters must be identical
  17. PeterPanettone

    Creating a Shell-Link with hotkey property

    When trying to open this link I got this error message:
  18. I have implemented a few improvements in the Uses Clause Manager Identifier Search: 1. The number of Identifier Search filter results is now displayed. 2. Previously the search term was searched only at the start of the identifier names. Now you can choose between "Match anywhere" and "Match at start". If you change the match type then the filter results are updated automatically. Here are the sources, so you can build GExperts with these new features yourself: GX_UsesExpert5.zip Fixed a small bug just now; if you have already downloaded GX_UsesExpert3.zip or GX_UsesExpert4.zip then re-download this archive. Here are a few Uses Clause Manager features planned for the future: • Export the list of Project Units additional option: Preformatted as uses clause. • Identifier search: Fuzzy-Search option • Identifier search: Optimize filter performance with TParallel.For • Identifier search (or all tabs?): Multiple search terms (like in RFindUnit) • Identifier search: Search the selected Identifier result in custom help files • All Tabs: Button/Combobox on the bottom panel to Copy the selected List item(s) to the clipboard, or to copy the selected unit path(s) to the clipboard, or to copy the selected unit FILES to the clipboard • SearchPath: Add a custom list of user paths • Add a Statusbar to the UCM window which displays the file-path of a single selected unit; then a Ctrl-click on the statusbar opens Windows Explorer at the location of the selected unit and selects the unit file in Windows Explorer.
  19. PeterPanettone

    Improvements in Uses Clause Manager Identifier Search

    Maybe you are wrong in believing that there are many people using slower computers. I believe that there are more people using faster computers than people using slower computers. Technically advanced computers nowadays are very cheap and many people can afford them. In the German Democratic Republic of Eastern Germany (GDR) there was a very funny car model: The "Trabi" ("Trabant") which was very popular because it was the only model available (from 1957 to 1990) in the communist country. It would be somewhat irrational assuming that a considerable number of people are still using the "Trabi" in their everyday life today. So a company dealing with "Trabi" replacement parts today would soon go out of business. There is much more money to be made with modern cars simply because most people are using modern cars. So, supporting Delphi 6 is a kind of nostalgic behavior, but has no real business value today.
  20. PeterPanettone

    Improvements in Uses Clause Manager Identifier Search

    Writing the whole text in uppercase letters nowadays would be really stupid. This has been done in prehistoric times out of necessity to increase the visibility of text on a computer screen because there was no technical possibility to do this otherwise on the very primitive computers of that prehistoric time. Then when text styles like Bold, Italic, etc. were invented and it became possible to use different font sizes, some people continued to constantly use their caps-lock key out of habit which was justly considered as impolite to do this. HOWEVER, writing single important words in uppercase is a way to rhetorically EMPHASIZE meaningful words in a text phrase. So, using rhetoric tools to add color and diversity to a spoken or written text is a very important cultural behavior. That's the reason why many people often fall asleep listening to or reading a text from a bad speaker or a bad writer. EMPHASIZING is important! It has nothing to do with "shouting".
  21. PeterPanettone

    Improvements in Uses Clause Manager Identifier Search

    OK, I will do that.
  22. PeterPanettone

    Improvements in Uses Clause Manager Identifier Search

    That would be very CONFUSING for the user: Showing "matches at the start first even in "match anywhere" mode": The user would think: Why are there only matches at the start if the option to start matches anywhere is selected? I am not sure, maybe you mean something different. You could make the "match at start" option the DEFAULT option, if you prefer that. BTW, do you have a slow computer? Then why should users with a fast computer SUFFER only because the programmer has a slow computer? This seems to be ILLOGICAL. But maybe this is only a misunderstanding.
  23. PeterPanettone

    Improvements in Uses Clause Manager Identifier Search

    I suggest using TParallel.For with conditional compilation to restrict filter performance optimization to newer versions, so Delphi 6 and Delphi 2007 won't be affected.
×