Jump to content

Leaderboard

Popular Content

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

  1. I still find myself getting stuck in the "old" ways of coding and somewhat have trouble breaking out of them . I have a question regarding getting something like user preferences throughout code. The way I have done it for years is I have some preferences dialog and a functional global that manages the preferences xml or ini file. When the program starts, the FG loads the file, then if the user updates the preferences from the dialog and saves, the new data is set in the FG and written back to the file. Now, anywhere I need to access the preferences throughout my code I can just use a "get" case on my functional global to get these user preferences. I know I am only writing to the FG from one place (the actual dialog when the user modifies it), so I don't need to worry about race conditions and such. Now, with OOP, I would load all this data into a class. But, my question is, what is the best way to get that class everywhere I need it? I am guessing the general response will be, "it depends!". Is the best option to have the classes that need the preferences data have a preferences data member, and then send a "preferences updated" message to all processes that need it? What if I'm launching a new window that needs it; should it be set in the initialization of the class associated with that Window? Just curious what methods others have used. Thanks.
    1 point
  2. No. I prefer the buttons to at least have borders and I generally also prefer the 3D effect which gives you additional feedback that you're seeing a button.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.