From: Bob J. <Bob...@lb...> - 2010-03-23 02:41:44
|
On Mar 22, 2010, at 6:57 PM, Dan Boudreau wrote: > My reason for playing around with preferences was originally to see > how the code handled invalid configurations. For example I was able > to configure multiple NCE connections without getting an error or > warning message when saving preferences. And it was pretty much as > expected. On the restart, an error message and exception trace does > show up as console messages. In this particular case, I believe > that only one NCE connection is valid. Right now, only one NCE connection works. When I set two NCE simulator connections, I do get a "You have duplicates..." dialog box while saving the preferences. I'm not sure why you don't. I don't think it's one that can be turned off in the preferences. I even get the warning with two LocoNet connections, which shouldn't warn. We need to fix that someday. > My questions? Should we try to warn the user that they have an > invalid connection when saving preferences, or should we wait until > they restart JMRI. If the later, where should we be doing this, and > should we display an error message popups? Definitely should warn at save time, so we need to figure out what's going wrong there. We should also pop errors during startup as dialog boxes, but by that point they're probably going to be pretty obscure. It'll take a lot of work to make them all well-explained. > Maybe the right approach is not to allow the user to configure an > invalid configuration. In the NCE case, we could remove NCE from > the manufactures list once a NCE connection was made. > > Also, can other manufactures have more than one connection? Right now, only Digitrax can have more than one connection. That's mostly due to the time (lots!) it takes to do all the changes for the migration. I haven't decided which one I'll work on next, but I'd be happy to help anybody who wants to migrate a favorite system. Bob -- Bob Jacobsen, LBNL Bob...@lb... +1-510-486-7355 fax +1-510-643-8497 AIM, Skype JacobsenRG |