I’d appreciate some insight into a problem I’ve run into with the ModernPreferences tool. I’ve been using this for a while with no problems and it works well in loading and saving string properties with preferences files. But today I’ve been puzzling over its behaviour with combo boxes. I wanted to store recent servers in a prefs file and then load them into a combo box. The current server goes into the text box and a list of recent server URLs goes into the combo box list.
The oddity is that I can assign a prefs entry to the text box fine, using
ComboBox1.Text = Preferences.ServerURL
but when I try to add a row to the combo popup menu with one of the other prefs entries it fails to run with the “There is more than one method with this name” error.
The prefs file contents look like this:
And as I say, the program seems happy to load a value into the combo box text box but not into the combo box list. I suppose I’m wondering whether ModernPreferences returns a string when it is loaded, and if not maybe that’s what’s going wrong. The various methods in ModernPreferences have a return type of “Auto” which doesn’t illuminate matters.
I have created a very simple project that illustrates this and am happy to share it (if I can work out how to), but I don’t want to clutter up this posting unduly with my code in case there is something obvious that I am missing.
Thanks in advance for any guidance that you can offer.