Jump to content

Mike Torrettinni

Members
  • Content Count

    1509
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Mike Torrettinni


  1. Timelord,

     

    these are some very expert questions... I just have simple single .exe application, with forms. In Project.dpr source I control if forms are created, based on parameters.

     

    - So, single source, single binary. I guess hybrid since I control if forms get created depending on input.

    - Simple application with Settings screen where checkboxes are read/saved directly from Registry.

     

    My application processes log files and creates reports, one fo them is Action Summary report. When run without parameters - 'normal mode ' - users can load and view different log files, and based on settings, that user can control, logs are parsed differently and different information displayed. User can create reports, like Action Summary report.

    When run as cmd (CLI?) parameters specify input log files, which report to run (Action Summary report) and output folder. In this case parsing and export is defined by user settings read from registry - (that user defined in 'normal mode').

     

    Right now, cmd mode wants to read UI checkboxes, and since some or all forms are not created (when in cmd mode), accessing checkboxes it not working. So, I want to split logic and UI access, to avoid UI access in cmd mode.

     

    When run in cmd mode, all user settings are read only. Never run concurrently, cmd and normal mode. Yes, for cmd mode only part of user settings are relevant, the rest are for normal mode.

    So it's a big parsing and reporting application and I would like to automate some of the reports, than can be automated.

     

    I think this answers all your questions. I hope this gives more details on my situation. 

     

    Thank you for your time!


  2. Hi

     

    I'm slowly preparing my application to run without UI, as cmd tool. So I started with User Settings. Right now I read and write user settings directly from Registry to UI (checkboxes) and back, Logic accesses UI to decide on workflow. Now I'm thinking like this:

     

    - Setup GlobalSettings record which will hold all user settings

    - on application start: read settings from Registry and write into GlobalSettings

    - on application exit (or on user demand - Save button on settings screen) - save settings from GlobalSettings to Registry

    - when logic needs to read user settings to decide on workflow, it reads directly from GlobalSettings - no more UI access from logic

    - if application is run with UI, I will have 2 methods to work with UI - UserSettingsToUI and UserSettingsFromUI which will populate UI with settings from GlobalSettings; and when user changes any settings they will be saved into GlobalSettings with UserSettingsFromUI

     

    So, the new GlobalSettings record will be the main settings 'engine' and UI will not access Registry directly, anymore. Logic will never access UI anymore, so even if application is run without UI, logic will run ok based on previously saved user settings.

     

    Is this the right approach?

     

    Thanks!

×