Jump to content


Popular Content

Showing content with the highest reputation on 07/07/23 in all areas

  1. Uwe Raabe

    Delphi SQL Formatter

    Recent Delphi versions also allow something like this: SQL.AddStrings([ 'FROM Entertainers', 'WHERE 1=1', 'AND TEST=''TEST''', 'ORDER BY EntCity ASC, EntStageName ASC' ]);
  2. Chris Pim

    iOS 17

    A huge thanks to David Nottage! A fix has been found and I've included below for those that need it. The changes need to be made in FMX.inAppPurchase.iOS.pas (copied into your own project first as usual). I've confirmed that this fixes the crash in iOS 17 and also still works in iOS 16. Not sure why we didn't see the crashes in iOS 16 but may be random luck given the nature of bugs like this. The same fix has been sent to EMB in the Quality Portal to hopefully include in the next update. procedure TiOSInAppPurchaseService.QueryProducts(const ProductIDs: TStrings); var ProductIDsArray: NSMutableArray; ProductIDsSet: NSSet; ProductID: string; begin //Check FProductsRequest isn't already in use if FProductsRequest <> nil then raise EIAPException.Create(SProductsRequestInProgress); ProductIDsArray := TNSMutableArray.Create; for ProductID in ProductIDs do ProductIDsArray.addObject(StringToID(ProductID)); // changed from the very poorly named PStrToNSStr to StringToID ProductIDsSet := TNSSet.Wrap(TNSSet.OCClass.setWithArray(ProductIDsArray)); FProductsRequest := TSKProductsRequest.Wrap(TSKProductsRequest.Alloc.initWithProductIdentifiers(ProductIDsSet)); // ProductIDsArray.release; -- comment these out to fix the issue // ProductIDsSet.release; -- comment these out to fix the issue FProductsRequest.setDelegate(FProductsRequestDelegate.GetObjectID); // calling GetObjectID without the redundant cast //Set off network activity indicator SetNetTrafficIndicator(True); //Now initiate the products request FProductsRequest.start; end;
  3. After working on 11.3 for months, my conclusion is that the LSP-based code completion and code navigation is much much unstable than the old non-LSP versions. I always have to kill the LSP server to get it back to normal...
  4. It turns out that the causes of LSP failure were more complex than I originally thought. In the attached project in TestCI-JclSysUtils LSP does not work. The project is relatively simple. It has three units Unit1.pas (a form with one button) uCommonFunctions.pas (contains three functions) JclSysUtils (an exact copy of the Jcl unit) With Jcl installed it compiles and runs fine. Here is the interesting thing. LSP starts working if: either you remove an unused import of JclPeImage from the uses clauses of uCommonFunctions or you remove the "forked" JclSysUtils from the project. Looks like LSP is a lot more fragile than is should be. I was without IDE support in my a project, since Delphi 11.2 was released and it took substantial effort and a bit of luck to restore it. TestCI-JclSysUtils.zip
  5. Anders Melander

    Problem writing to memo on main form from thread

    Replace application.processmessages with form1.TestMemo.Update ...and then Google "avoid application.processmessages", "never use application.processmessages", "don't use application.processmessages", etc.
  6. I have created library for Delphi-Console-Applications Supports Windows 11 (and earlier from XE5?) Replaces CRT Unit - crt.pas Can be used to write modern and appealing console applications. Should allow older (legacy) source code (Borland Pascal 7.0) to run under Windows. Unicode-Support (including e.g. chinese characters) many more features - see GitHub https://github.com/playcom-de/Console I hope this is helpful for someone. Question, suggestions and error reports are welcome.
  7. Firstly, let me say that my work on SynEdit has moved back to pyscripter/SynEdit for reasons explained here. The newest enhancement to SynEdit is accessibility support. Now, SynEdit fully supports screen readers such as Windows Narrator and NVDA. The support is much better than, for instance, in Visual Studio Code. The implementation is not based on the older Microsoft Active Accessibility (MSAA), but on the newer Microsoft UI Automation. Microsoft UI Automation has been around since 2005 and is available to all Windows versions, since Windows XP. In addition to making applications accessible, it can also be used by automated UI testing tools. Despite been available for almost 20 years, Delphi does not provide the relevant header translations (See RSP-41898), which complicated the implementation. I also could not find any other complete Delphi implementation of UI automation. So, the SynEdit implementation may serve as a guide to how to implement UI Automation in other controls. Further details can be found here.
  8. Edwin Yip

    Delphi SQL Formatter

    Try GExperts -> Editor Experts -> Paste String As. This is a gem from GExperts. Furthermore - you have 'Copy Raw Strings' which does the opposite.