Jump to content

Mike Torrettinni

Members
  • Content Count

    168
  • Joined

  • Last visited

Community Reputation

10 Good

Recent Profile Visitors

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

  1. Mike Torrettinni

    Laufleistung

    What about "Lifetime km/mi:" ?
  2. Mike Torrettinni

    Should I keep class alive (global) or not?

    @Stefan Glienke What would be your suggestion on my original question, how to keep data alive - to keep the class alive or store important data from class and free the class?
  3. Mike Torrettinni

    Should I keep class alive (global) or not?

    Thank you, interesting. And this is singleton, right?
  4. Mike Torrettinni

    Should I keep class alive (global) or not?

    Ok, lets assume we call method/property SetData1to set Data1 value... then how do I access same Data1 value from Main Form and Check form? Do I need to use someLocalVar := TDataStore.Data1everywhere or is someLocalVar actually global variable, gGlobalDataStore?
  5. Mike Torrettinni

    Should I keep class alive (global) or not?

    Aha, I thought singleton is just 'then way you use class' thing. I use records for what you described above - a data container (global variable) without needed for creating an instance, while classes are used with .Create, so I guess this means I always uses classes as created instances. So, are you describing a record (with properties, methods...)? I need to access it from Main Form and Check form, and perhaps other units, too.
  6. Not sure how to ask this, but I'm not sure how to 'properly' use class information: do I keep class alive in memory to access data at any time (global), or create and free class on demand and save data to variables (global)? Here is example of Check for translation file update example - I have 3 units: - Main Form with Check button - Check Form - CheckForTranslation class So, from Main Form I call Check form which creates local CheckForTranslation class variable in FormShow, uses class methods to check and display information if any new translation files are available. Check Form gives me option to download file, if I want to. Now I would to keep info if new translation file is available, so I don't need to keep checking (until next project restart). So, the options I see: 1) Create CheckForTranslation in Main Form global variable and use it when needed (in Check form). This allows me to always access results from checking, and just keep all data available at any time, any where. But, is global class variable, which I try to avoid, if possible. 2) Only create CheckForTranslation in methods as needed ( and free class at the end of method) and save status in global variables so that status is always available - this option only saves a status variables (maybe 2 - gNewTranlsationFileAvailabe: boolean and gNewTranlsationFileDownloadLink: string). So, some information I will definitely need to keep around, a class or simple status variables. I'm not sure what is good approach to create such class, when to free it and how to use the information from it. Any advice would be helpful!
  7. Mike Torrettinni

    Good design for "file was just saved" message

    I have a combination of menus, context menus and also simple TButtons that do the Export/Save as... not sure how I can implement this easily. If you have an example of any other app, where I can see the design of this (even googling the image, screenshot should be fine), would be nice to see.
  8. Mike Torrettinni

    Good design for "file was just saved" message

    Good advice for 'application log', will think about it. Right now I have 'recent files' for importing into the project, while content is completely different than the report files, so I will see if my imagination can put these two together and present as a general entry log. So, a question for you: I assume you would use 'Do not show message when creating files' checkbox, when it first pops-up, knowing you can access any report file through another way, like 'View all created files' option?
  9. Mike Torrettinni

    Good design for "file was just saved" message

    Thank you, for now I already have a form for this. If I need something similar in the future, will look into this. At the beginning I didn't know how the design will be, what I will need to show, so it was easier to design a form and see the controls.
  10. Mike Torrettinni

    Good design for "file was just saved" message

    OK, I went a little overboard with options... but it's still in design mode:
  11. Mike Torrettinni

    Good design for "file was just saved" message

    Great! I think I never actually used such button. I see the potential, let me try.
  12. Mike Torrettinni

    Good design for "file was just saved" message

    There is no default action - I guess it could be 'Open file', not sure yet. The most common next action, after creating a file, is to open it. As for the other actions, I will get feedback from users what would be a must, what is requested and what I can gather from general feedback. I don't want to have too many buttons, but I like your suggestions - maybe I could have context menu on filename label: - Copy File to Clipboard - Copy full name to Clipboard - Send to Email All these options are already available just a click away - in Explorer.
  13. Mike Torrettinni

    Good design for "file was just saved" message

    So far I have this design: In my project some reports are not asking for filenames and are generated automatically, but most of the reports do ask for filename. So, this new message will provide more info for both cases. Esc key to close the form works, so it's easier to continue with workflow if needed. The checkbox 'Do not show message when creating files' provides an option for users to disable this message. I'm quite pleased with result.
  14. Mike Torrettinni

    Good design for "file was just saved" message

    I agree with you in some examples, like I don't want to see 'Do you really want to Exit?' questions when I want to exit application. On the other hand, there is one Delphi component that checks for issues, and if it doesn't find anything there is absolutely no response and message/error window stays blank. So you don't know if it did its thing or not. It's almost like saying progress bars don't need to shown. So, a strictly one or the other way is not user friendly, and it also depends on application. It's just a matter of finding right combination - but who develops perfect application, perfect user interface for every user? I appreciate the different point of view- I might design things differently and not only my way 😉
  15. Mike Torrettinni

    Good design for "file was just saved" message

    Certainly a valid point, but my users already get a message showing success. Now they will get more useful one. Actually, I think I will add user setting 'Don't show file confirmation message' or similar and that should be useful. I hope this satisfies both user types.
×