Jump to content

Martyn Spencer

Members
  • Content Count

    33
  • Joined

  • Last visited

Community Reputation

0 Neutral

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Martyn Spencer

    Converting simple VCL form to FMX

  2. Martyn Spencer

    Converting simple VCL form to FMX

    I am purely concerned only with the controls and their layout. It's clear that the frameworks are quite different and I am under no misapprehension that the entire process could be automated, but converting, say, a VCL TEdit, or a VCL TPanel to a corresponding FMX control should be quite possible and that Embarcadero suggested Mida implies that certain elements can be done. My objective is to find out how much (if any) can be automated. Thanks for the comment, though.
  3. Martyn Spencer

    Converting simple VCL form to FMX

    Thanks for the explanation Gustav. I think the approach I am going to take is to create some basic macros to convert property names and work with the DFM files. I have been experimenting and have been able to migrate a relatively simple form by changing property names and removing those that are not directly supported. It's not perfect, but in the absence of anything better, it's probably the route I am going to take. It's genuinely disappointing about Mida Converter. Embarcadero at one point offered it with Delphi for a limited time so I imagine it did some of the grunt-work successfully.
  4. Martyn Spencer

    Converting simple VCL form to FMX

    Fortunately, I wasn't expecting a free ride and full automation, but if there was a tool that could take the basic VCL controls and map properties automatically, it would have been great. I am rapidly coming to the conclusion that it may be better to start from scratch, but I would have been daft to have not asked if there was something that others had found. Thanks for the feedback, though.
  5. Martyn Spencer

    Converting simple VCL form to FMX

    I am aware that there would be coding changes required, but we are talking about some really simple UI designs that naturally I could do by hand. If there were a tool (and Mida is not that tool given the developer's lack of response), it would be great. Thanks for your feedback so far.
  6. Martyn Spencer

    Converting simple VCL form to FMX

    This is perhaps a slightly naive question, but I would like to convert a very simple form (some checkboxes, edits, memos etc) that only contains VCL controls to an FMX form. I found "Mida Converter" and purchased a license but the developer has been pretty much non-responsive. The software has a registration system that uses non-HTTP/HTTPS ports to handle the process and rather than just shipping a registration code, the process seems to be harder than required. He has not set up the account correctly, so I am unable to complete the activation. So, a refund is now in progress. Long story short, I have not been able to see if it would handle the job. I have a few forms that I could handle by hand, but automation would definitely be preferred. I have a larger project with many forms and many standard controls and if there were a tool to handle most of the UI grunt work for me to worry about code changes, modals etc, it would at least help with the process. Can anyone comment on the way that they handle such simple conversions and whether they have or use a tool that can take a DFM and convert it to an appropriate FMX DFM? Thanks in advance.
  7. Martyn Spencer

    TFrame and VCL styles [solved]

    Works just fine, thanks 🙂
  8. Martyn Spencer

    TFrame and VCL styles [solved]

    Thanks Uwe. I will give that a go to see if it works.
  9. Martyn Spencer

    TFrame and VCL styles [solved]

    Thanks Anders. I have seen their skinning controls and they do seem better than the VCL themes (imo). I am having trouble finding something that offers consistently reliable and attractive themes, but that's probably not for this thread. Appreciate you taking the time to respond.
  10. Martyn Spencer

    TFrame and VCL styles [solved]

    Do you use a different styling system at all? I ask because I generally think that VCL styles look pretty darned ugly in most instances.
  11. Martyn Spencer

    TFrame and VCL styles [solved]

    Hi Anders. I did do a search before posting - I always do. I found some links that should allow the frame background to be transparent, but this simply caused there to be corrupted graphics where the frame background should be. Setting ParentBackground to True has no effect. The TFrame picks up the background that's set at design time and ignores the theme selection. One thing I have not tried is setting ParentBackground and attempting the use of transparency, so I'll give this a go.
  12. Martyn Spencer

    TFrame and VCL styles [solved]

    I been working on a VCL styled application developed initially by someone else and have just started using TFrames to rationalise some of the UI. It would appear that TFrames do not support VCL styles. Is this so? The main frame background appears to be rendered in whatever colour is set as the TFrame "Color" property. I am using Delphi 10.2.
  13. I rarely use Quickreport, preferring other report writers. I have to change an existing report so would appreciate any assistance. In a Quickreport detail band, I have a "description" TQRDBText and below this there is a "notes" TQRDBText. The "description" field is set to auto-stretch. How do I ensure that the top of the "notes" field shifts relative to the "description" field's height and will the detail band automatically increase its height based on changes to the positions and heights of these fields?
  14. Martyn Spencer

    FireDAC Postgresql performance vs ADO SQL/Server performance

    Hi both. Thanks for your comments. It would appear that based on the settings identified, the grids are fetching all data so that the user can manipulate it based on the various grid functions (sorting, filtering etc). To answer the first question that @Attila Kovacs raises, 90+% of the time, the users view the top 10-20 rows in any given grid, but the original system design fetches anything from 2-10K records back "in case" the user wants to start applying filtering etc. This is not a work flow that I feel works well with any client/server system and would typically change the system so that it fetches relevant data based on pre-specified conditions and in the first instance only fetches records that are in view, with appropriate pagination. So, in reply, I would say that unless the user has specified any custom sorting, filtering etc, it would have been good to carry out just a partial fetch. Ultimately, I will be replacing these grids so I am looking for a short-term "fix". It looks as though all records are fetched. I am concerned with the initial fetch and was hoping to reduce the quantity of data. I was further hoping that filtering and sorting would result in modifications to the underlying query, rather than relying on a complete database fetch then client-based sorting/filtering. I think this is answered by what @Alexander Elagin suggests, I could try the "server mode" and see if this works more efficiently without restricting the user. I am asking what the nearest equivalent to ADO is with FireDAC, so am not sure. The default is fmAll, which clearly fetches everything. I believe that there is an on demand setting, but am not sure how well it works with the DevExpress grids. I am looking for the best option to return only visible records unless the user starts filtering or sorting. I appreciate that this may reduce functionality (as suggested above). Yes and testing demonstrates that this is not the issue. It really does appear to be the quantity of data returned by the initial fetch. I also note that when there are master detail relationships, ADO performance does seem to be better than FireDAC for some reason, even given that the ADO/SQL server based tables have no indexes and the Postgresql tables do (and are being used). Differences in the database engines, based on testing, do not appear to account for this. It just seems as though FireDAC has a greater overhead. It was monitoring that highlighted the number of fetches being made by FireDAC. I do not know of an equivalent way of monitoring ADO so any suggestions would be welcome.
  15. My experience with SQL server is very limited and I generally use Postgresql or Oracle with very good results. I am part way through a project for a client where the existing system uses SQL server/ADO and I am moving to a Postgresql database and FireDAC. The system was created by a different developer and his approach was very different to mine. Having replaced old dynamically created queries with appropriate parametrised and more optimal queries, I find that the performance is not what I would expect. The existing SQL server database has a pretty poor design and no indexes. The Postgresql database is better designed, has appropriate indexes, and when accessed natively offers better performance to running equivalent queries on the SQL server database. With this in mind, I do not think that the issue is related to server performance, or the connection to the servers. The existing system makes extensive use of DevExpress tables and relies heavily on filtering provided by the grids. I generally do not work this way, preferring to provide more tailored functions depending on the specific work flow, etc. I will start by saying I think that the root of the problem is related to the amount of data being fetched from the database, potentially including metadata retrieval. Both databases are operating in a data centre and accessed over the Internet. This is not my preference, but it does demonstrate a significant performance difference between the two systems. Running against a local database shows little difference between the two. Experience tells me that the ADO based system is probably fetching records on demand, whereas I think FireDAC is fetching all rows and possibly metadata as well. Having read the FireDAC documentation, it does appear that I have more control but I would be interested in what settings would give comparative performance to the ADO based system, if any. My ideal is to only fetch data when the user pages through a grid. In the long-term, this will be less of a problem because I will be more specific in my queries, but I have a transitionary period where I would like to allow the users to make use of the existing grids with the lowest possible performance penalty.
×