Leaderboard
Popular Content
Showing content with the highest reputation on 10/23/24 in Posts
-
Feature enhancement request - Filter DFM properties
Jim McKeeth replied to pyscripter's topic in GExperts
I was talking to someone the other day about this too. I had thought about creating an IDE add-in to effectively "lock the form," where it ignores all those "accidental" changes. I think it would be really useful to also ignore things like active tab in the tab control, etc. Usually when I'm submitting changes in source control I only want to submit the minimum changes for the fix I made, but then I want to make sure that that subset works, so I have to revert unneeded changes, test that code state, and then submit it. So a filter or lock would be really helpful.- 11 replies
-
What could possibly go wrong
-
ANN: HTMl Library 4.9 released. WebUI and more
Alexander Sviridenkov posted a topic in Delphi Third-Party
WebUI - new LowCode Web framework for Delphi. See https://youtu.be/XCmvz2DPN4Y Documentation: https://delphihtmlcomponents.com/webui/ Sample project: https://delphihtmlcomponents.com/webui.zip How to use 1. Extract files from zip. 2. Run nw.exe (requires Administrator because uses http.sys web server) 3. Enter your DB connection details or leave demo DB 4. Press Create UI 5. After UI is created press Start server and open http://localhost:8080 in browser. Core New THtListView component (VCL/FMX) - display data in listview-like layout with full HTML support. THtDocument.AsBitmap method - convert document to bitmap. New printing parameter - PrintAsBitmap. Useful when printing white text over black/colored background. TElement.AddCSSRecursive(const CSS: string; UpdateStyleAttr: boolean = false) - set property for element and its descendants. SVG: support for switch element. THtXMLNode.JSON method - save to JSON THtXMLNode.XML property - set node inner XML. THtJSONSerializer class - serialize objects and records into JSON. Templates: support for conditional sections: {{@name}}..{{/name}} - name is not empty {{@!name}}..{{/name}} - name is empty Templates: class functions for rendering and JSON support (result is encoded as JSON): RenderTemplate(const ATemplate: hstring; AContext: THtXMLNode; JSONMode: boolean = false): string; RenderTemplate(const ATemplate: hstring; AContext: TStrings; JSONMode: boolean = false): string; Templates: ThreadSafeRender methods - can be called simultaneously from different threads. New VCL and FMX unit htprinters / fmx.htprinters - manage printer setting - set custom paper size, list available paper sizes, etc. New unit htboxes - calculate optimal layout of boxes on pallets and inside container. See PalletCalc demo. Scripter x64: support for var parameters in methods Support for calling interface methods Write and Writenl functions - output to debug console. New HTMLtoText(const s: string) function. Console.log/warn/error messages without debugger are sent to system log (OutputDebugString). Editor Improved Markdown conversion (better lists support) Reports Barcode element - new type: auto - select barcode type depending on data length and symbols. SQL TSQLSelectStatement - new methods AddTable AddJoinedTable Advanced CreateQueryforTable method. Improved support for limits in different dialects TSQLContext: JSONMode property. new AddSelectQuery method. PROGRESSBAR SQL function. TSQLParam.ValuefromString method. New TDMField properties: property ContentType: string; property MaxDataLength: integer; property UniqueValuesCount: integer; property UniqueValuesPercent: single; property UniqueValues: string; New TDMTable method: FillContentTypes - analyze table data and fill field properties. New TDMTable method GetReferencedTabler - return tables that reference this table in FK. New TDMTable properties: property RecordCount: integer; property TableType: string; New TDMQQuery methods function AsRowData(Limit: integer = 0; LowerCase: boolean = false): THtXMLNode - serialize to XML function AsJSON(Limit: integer = 0): string - serialize to JSON function InsertXML(const Table: string; Fields: THtXMLNode; Schema: TDMSchema; ReturnKey: boolean = false): TDMQuery; - insert to table using parameters from XML attributes. function UpdateXML(const Table: string; Fields: THtXMLNode; Schema: TDMSchema): TDMQuery - update table using parameters from XML attributes. procedure ToXML(ANode: THtXMLNode) - serialize to XML function ExecWX(Params: THtXMLNode; const ASQL: string): TDMQuery - execute query using parameters from XML attributes. New method TDMVirtualSchema.RegisterQuery(const SQL, TableName: string; const TableDescription: string = '') - register SQL statement as virtual table. TDMDictionary class - abstract class for application dictionaries. Implementations: TDMSQLDictionary TDMStringDictionary TDMJSONDictionary TDMDictionaryManager - application dictionary manager class. TDMVirtualQuery class - class for performing SQL queries on virtual databases. Office Faster snippet extraction. Support for DOCX embedded fonts. Improved rendering quality for PDF, XLSX, RTF, Outlook, DOC and DOCX formats. Better search in code files (PAS, C, etc.). Support for referenced images (cid:) in Outlook messages. -
Execution time difference between 32b and 64b, using static arrays
Stefan Glienke replied to lg17's topic in General Help
It looks like whoever implemented that in the Delphi compiler was overly obsessed with codesize. If you compare what both gcc and clang do you can see that they rather produce a ton of mov instructions (which execute nicely in parallel on modern processors) before using memmov or rep: https://godbolt.org/z/Gjsqn7qas (change the size of the static array to see the assembly code change) -
Good to know one can learn something new even at my age :)...
-
@Jim McKeeth has updated the GExperts documentation a bit. It’s far from finished but that’s better than the totally outdated one on gexperts.org. I have now exported it as webhelp and checked it in to subversion. You can read it at my newly created domain help.gexperts.de. (The domain is temporary only for now. I got it cheap but I’m not sure I will keep it.)
-
SynEdit now has annotated Scrollbars. In this screenshot you can see in the scrollbar: the position of the multiple carets (full blueish line) lines with errors (full red line) the position of the bookmarks (mini bluish marks on the left) line modification info (on the right side) alpha-blended slider This feature is on the multicaret branch. Zoom In/Out/Reset functionality has also been implemented. You can still vote on this poll to influence future development. See the technical details. See also SynEdit now supports mulit-caret, multi-selection editing - I made this - Delphi-PRAXiS [en].
-
Feature enhancement request - Filter DFM properties
Uwe Raabe replied to pyscripter's topic in GExperts
And Embarcadero still refuses to implement this feature request (despite its 188 votes): RSP-35301 - Option to design in Screen PPI but save in 96 PPI For me and quite a couple of other users that is mandatory for using the IDE in High-DPI.- 11 replies
-
PLABEL VCL Labelling, FlowChart and Technical Drawing editor
Alberto Fornés replied to Alberto Fornés's topic in Delphi Third-Party
Ok, I understand your requirement, I will add in next release. -
Using Python4Delphi library in a Windows service
pyscripter replied to Luca Pretti's topic in Python4Delphi
When you run as a service the registry information is not available. You need to do something like: procedure TService1.CreatePyEngine; begin PythonEngine := TPythonEngine.Create(nil); PythonEngine.Name := 'PythonEngine'; PythonEngine.DLLName := 'python313.dll'; PythonEngine.DllPath := 'c:\pathtoyourpythonhome\'; PythonEngine.RegVersion := '3.13'; PythonEngine.UseLastKnownVersion := False; PythonEngine.FatalAbort := False; PythonEngine.FatalMsgDlg := False; PythonEngine.LoadDll; end; I have tested and it works. -
Feature enhancement request - Filter DFM properties
JonRobertson replied to pyscripter's topic in GExperts
That would be useful. Or the ability to select which property changes you want ignored. The main downside would be remembering to turn off the "lock" when I intentionally make changes that I want to save. I use Beyond Compare before every commit and I'm in the habit of undoing unwanted or accidental form changes. I have been for over a decade now.- 11 replies
-
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
I have open an issue to QP: RSS-2192 -
Feature enhancement request - Filter DFM properties
corneliusdavid replied to pyscripter's topic in GExperts
That'd be great. I have tried Delphi's "Lock Controls" (on the Edit menu) but it only lasts for the current session (when you close and re-load, it's off again) and I don't remember to turn it back on. Also, when using Delphi in DPI-Aware mode, there are still changes even when I don't touch anything; I just pulled up a fairly simple form and closed it without moving anything and 12 lines of changes showed up in my Git diff, half were ExplicitXXX properties because I had the GExperts feature off, the others were ItemHeight, ClientHeight, etc.; Using DPI-Unaware mode, nothing changed (thanks, @JonRobertson for that observation!).- 11 replies
-
If the OP would explain the original motivation behind this, then we could propose proper solutions to the actual problem. This is a canonical XY question.
-
Here is my MemTest unit which I use together with WinMemMgr, in all my productive applications: https://github.com/thatlr/Delphi-SupportUnits/blob/main/source/MemTest.pas
-
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
Replace: //l_vec3 := k_vect3_nul; //option 3 move(k_vect3_nul, l_vec3, sizeof(t_vect3)); //< Edit with sizof(type) -
You can't add a new property to all components. But, the existing Tag property is a NativeInt, so it can hold a String (which is just a pointer under the hood), eg: var tagStr: NativeInt := 0; String(Pointer(tagStr)) := SomeString; SomeComponent.Tag := tagStr; ... var tagStr := SomeComponent.Tag; SomeString := String(Pointer(tagStr)); Just make sure you release the String properly before the Component is destroyed, eg: var tagStr := SomeComponent.Tag; String(Pointer(tagStr)) := '';
-
@PeterBelow It is even possible to inject new properties to the Object Inspector. In Cmon.DataSense.Design.pas I use this technique to add a DataSource and DataField property to supported controls. The additional data is stored in a special component (TDataSense) using a dictionary internally:
-
Suggestions for improving the display of tabs in the SourceCode editor
Uwe Raabe replied to PeterPanettone's topic in Delphi IDE and APIs
AFAIK, italic is already used for Files implicitly opened while debugging. These files are automatically closed when the debugging ends as long as the corresponding option is set (see Debugger Options -> Auto close views after debugging), but the state can be changed in the context menu. So, I'd also opt for something configurable instead of hardcoding. -
Suggestions for improving the display of tabs in the SourceCode editor
havrlisan replied to PeterPanettone's topic in Delphi IDE and APIs
Instead of hardcoding it like this and making it optional (which makes little sense), it would be better to fill the Tab Options (Options > Editor > Tab) with way more options, such as choosing colors for each scenario (locked units, system units, etc.), or disabling them altogether. -
Feature enhancement request - Filter DFM properties
corneliusdavid replied to pyscripter's topic in GExperts
I see Top/Left/Width/Height/ClientWidth/ClientHeight change a lot, too--and I'm pretty sure I don't move those components every time I open a form.- 11 replies
-
This is the unit @Stefan Glienke was referring to. 100 lines and it uses no other unit!
-
That benchmark proves almost (*) nothing, the only point where it allocates is during the form creation where it builds the card deck and later when it prints the output into the TListBox. (*) the only thing affected here is the possible layout of the card objects in the heap as they are all read during the hand-processing code. The difference that you can observe here between Delphi buids using different memory managers is most likely caused by the amount of overhead the respective memory manager is using thus fitting more card objects within the same memory pages, thus more of them (most likely all on modern processors) fitting into L1 cache. As for this particular code - removing the name of the Cards from the object and only building it when it is needed for some UI would probably speed up code more than anything else because you get rid of 20 Byte for every object (Name is a string[19]) - on my CPU this makes the code go down from ~900ms to ~680ms - simply because it does not need to copy the strings in CopyCardFromDeck. Circumventing the getter and setter of TList (which contribute around 25% of the remaining time) brings it down to 460ms. And after that we are not done with string stuff - in every loop iteration, it calls Hand.SetHighValues which produces a name for the cards on the hand - removing that gets me down to ~400. Now because I have a run and SamplingProfiler open already I see that now one of the scorers is TcaaPokerHand.CopyCardFromDeck - the Items getter is not inlined which causes it to be called 10 times for the same 2 card objects. Changing that gets me down to 270ms. But how about avoiding repeated access to the same object in the 2 lists altogether? 230ms I could go on because I see a lot more room to optimize - but I think I made my point. Instead of fiddling with the memory manager one should first look if heap allocations are even the issue. And then identify unnecessary work and eliminate that. ... change TcaaEvaluationCard to be 8 Byte size - (that avoids that the compiler creates a movsd/movsb instruction but simply does an 8 byte mov) -> 160ms
-
I always do a clean install. I never used migration tools 'cause heavy issues in the far past. FIrst thing is backup the "Styles" and "Style Template" folders. Uninstall every getit packages (really fews). After I have disinstalled RAD STUDIO, I do those steps: 1) Delete the Windows registry (and all subfolders of course): HKEY_CURRENT_USER\Software\Embarcadero HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Embarcadero 2) Delete the folders (and subfolders) of my disk (YOURACCOUNTNAME is the name of my account): C:\Program Files (x86)\Embarcadero C:\Users\YOURACCOUNTNAME\AppData\LocalEmbarcadero C:\Users\YOURACCOUNTNAME\AppData\Roaming\Embarcadero C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp I left this path without delete anything, 'cause normally have no relevants for issues (only one time this locked an installation, I had to delete it to continue). C:\ProgramData\Embarcadero