Jump to content

bzwirs

Members
  • Content Count

    39
  • Joined

  • Last visited

Everything posted by bzwirs

  1. bzwirs

    TAlphaColorRec in Android

    Delphi 11.2 Winsoft PDFium In app for Windows and Android I am using PDFium to create an invoice as a PDF. Included In the PDF are 2 lines of text that are colored red and one rectangle filled with color blue. Using PDFium I need to use TAlphaColorRec.Red and TAlphaColorRec.Blue to display the color on the PDF. This works fine on Windows but when compiled for Android the text colour shows as blue and the rectangle fill color is red (ie. opposite of the selected colors). Reversing the colors fixes the problem for Android but would appreciate if someone can please explain why this would happen. Thanks Bill Zwirs
  2. Have recompiled an app for Android with Delphi 11.3 and now get the following error when entering numbers into a dbdatagrid (Firepower) and tmsfnc edit control (in both cases have keyboard set to numberpad): Eval Error in: java.lang.indexoutofboundsexception setspan(3...3) ends beyond length 1. The error only occurs on Android tablet - not on Windows version. Have never seen this error before under previous versions of Delphi. Can someone please shed some light on this problem and point me in the right direction to fix it. Bill
  3. bzwirs

    java.lang.indexoutofboundsexception

    At the time I had this problem I ended up going to the component creators of the components where I was having this issue (Woll2Woll for the datagrid and TMS for the TMS Edit component). Both provided updates that fixed the problem.
  4. Using Delphi 12, Woll2Woll Firepower Data Grid, Firedac Query, SQLite DB Have an app that has been used for couple of years without any significant issues until recent compile with Delphi 12. The issue is with editing an integer field in a Firepower data grid. For the field keyboard type I have selected the numberpad type. Previously users have always been able to select the minus sign to input a negative number but this no longer works since the last compile for Android. Can anybody please help with advice on how to fix this issue. Bill Zwirs
  5. Today I added a TEdit component to the grid for the column with the integer field but again, still cannot enter a negative number from the numberpad on Android.
  6. Yes they do plus you can add other edit components. So this may be a Woll2Woll issue as the app compile now uses the latest Firepower components update for Delphi 12 and there were no problems with the earlier versions. I will add a post to their forum. Thanks.
  7. Simply Datasource linked to Woll2Woll Firepower grid. No additional edit components.
  8. I am trying to parse a json response to retrieve a nested record without any success. Example of the json response is: { "status": "1", "info": "success", "page_info": { "total_page": "1", "record_per_page": "1", "current_page": "1", "total_record": "1" }, "records": [ { "machine_id": "25884", "imei": "", "install_date": "", "last_report": "", ....... ....... "coin_mech": { "coin_mech_id": "12345", "cm_model": "", "serial_no": "", "revision": "", "coin_in_tube": "", "tubes": [ { "tube_id": "3469107", "tube_no": "4", "coin_unit": "100", "coin_count": "93", "coin_inserted": "0", "coin_dispensed": "0", "tube_full": "0" }, { "tube_id": "3469105", "tube_no": "5", "coin_unit": "200", "coin_count": "9", "coin_inserted": "0", "coin_dispensed": "0", "tube_full": "0" } ] } }] } The info I am after is the records for "tubes" which can contain up to 5 records (2 in the above example) . Have tried several of the coding examples that I found in stackoverflow without success although I have not found an example with a similar record structure. Can someone please advise me on how to retrieve those records (would be great if in a dataset). Thanks in advance. Bill Zwirs
  9. Hi, Ended up using example from aehimself. That was the easiest to implement in my app and worked straight away. regards Bill
  10. Thank you to all. This gives me a lot to try so will let you know at a later date whatever has ended up working for me. Thanks again to everyone. regards Bill Zwirs
  11. I need to collect all tubes data. At this stage, specifically the coin_unit and coin_count fields. Bill Zwirs
  12. Sorry...normally first thing I add. FMX application on Delphi 11.3. Bill
  13. I have used Rest Debugger to set up my components (Client, Request, Response, DatasetAdapter and TDFMemTbl) to populate the MemTable with all the records from the "records' part of the response. When I execute the Request I get a Response Ok, part of which is shown below: {"status":"1","info":"success","page_info":{"total_page":"21","record_per_page":"50","current_page":"1","total_record":"1029"},"records":[{"machine_id":"16748","imei":"8615850........................ If I right click the MemTable to view the "records" data all I get is the 50 records (ie. "records_per_page":"50"). I simply want to use the MemTable dataset in a report (using Fast Report) so need ALL records available which, according to the response should be 1029. The report I have created only shows the 50 records at this stage. So my question is......how do I get all the records from the Response to show in the MemTable? Any assistance would be appreciated. Thanks Bill
  14. bzwirs

    JSON records in TFDMemTable

    Thanks....you were right. I was able to increase the records_per_page setting in the url request which maxed at 200. Any higher and it went to default of 30. I then did multiple requests (of 200) for each page (as you suggested) which were combined into one dataset and all worked fine. Thanks for your help. Bill
  15. bzwirs

    Unsupported Pixal Format

    Delphi 11.2 I use Winsoft Pdfium for FireMonkey to create a PDF that includes a graphic (png saved to a SQLite table field). The graphic is inserted into the pdf document (as the document is being created) with the following code: Sig := tMemoryStream.Create; try MarafillerDM.EMUInvQrySIGNATURE.SaveToStream(Sig); var aBitMap := FMX.Graphics.TBitmap.Create; try aBitMap.LoadFromStream(Sig); MarafillerDM.FPdf1.AddPicture(aBitMap,18,135,230,80); finally aBitMap.Free; end; finally Sig.Free; end; Up until a couple of weeks ago this worked for both Windows and Android without any problems but now I get an 'Unsupported Pixal Format' error from the Winsoft AddPicture procedure - but only on Android devices (Samsung Tab 6 Lite). On Windows it still works fine. Haven't changed anything in my Delphi environment (updates etc) between it working and not working. Has anyone else experienced this. Would appreciate any help with this issue. Bill Zwirs
  16. bzwirs

    Unsupported Pixal Format

    I have sent an email to Winsoft a week ago but as in past requests to them, I have not received any response. So am looking for help elsewhere. Bill
  17. bzwirs

    Stack Overflow error

    Just updated to 11.3 (from 11.2) and now get an error when I launch one of my FMX apps in the IDE. The error is: Danger Stack overflow - save your work and restart Delphi 11. and the .dpr file is displayed on screen. I have other FMX apps that I can successfully rebuild in 11.3 without any problems. Any suggestions as to where I should look to resolve this issue. Thanks in advance. Bill
  18. Have updated to Delphi 11.3. FMX App Since updating I now get an access violation when using the 'Generate Sql' button from the TFDUpdateSQL component. What can I do to fix this problem? This has never happened under previous versions of Delphi. Bill
  19. bzwirs

    Stack Overflow error

    The first install I opted to save registry entries which normally means I don't have to reinstall the 3rd party components that I use and then I was getting that error. This time I did the opposite and reinstalled the 3rd party components I use and get no error when opening that project. So assume that it must have something to do with a corrupted 3rd party setting in registry from first install. In hindsight, I may have achieved the same result by simply just reinstalling the 3rd party components. Just for your interest, the 3rd party components I use in that particular project are TMS, Woll2Woll, HTML Editor and PDFium (WinSoft).
  20. bzwirs

    Stack Overflow error

    Have reinstalled Delphi with delete registry entries option this time and reinstalled all 3rd party components.....project now opens without error and compiles for Win32. Unable to compile for Android yet but have found that SDK paths are not there so probably need to reinstall Android SDK.
  21. bzwirs

    Stack Overflow error

    I tried your suggestion re copying the dpr and dproj files to another directory. Opened Ok, just complained about other units not being there which would be expected. There are only 3 pas files to this project - Main, Datamodule and proxy file. I first introduced the proxy and datamodule files and in both cases opened Ok except for complaining about the file not there. So finally got the error when I introduced the main file. The main file code shows in the IDE but when I select the Design tab then Delphi closes down completely. So I figure the problem is in the .fmx file. Is there anything in particular that I can look for in that file? At this stage I am thinking about a complete reinstall of Delphi (third party components and all) to see if that helps before I try anything else.
  22. bzwirs

    Stack Overflow error

    Dalija, There are no .dsk files. The exact error is: Bill
  23. bzwirs

    Stack Overflow error

    Thanks for your advice Dalija. I have tried to open it through File/Open as you suggested but that didn't work for me. Over the next few days (when I get some time) I will try your other option in trying to re-create from scratch. I'll let you know how it went. Thanks again. Bill
  24. bzwirs

    Stack Overflow error

    If I remove the .dproj file then I get the following error: No I didn't get a callstack from the IDE, just the stack overflow message.
  25. bzwirs

    Stack Overflow error

    Have tried but then cannot open project because of missing .dpr file.
×