I do searching for rooms (I'm doing the UrlyBird assignment) with two combo boxes for location and name respectively.
I might happen that the combo boxes don't display the current state in the database. This might happen e.g. when another client created a room in a new location. The new location isn't among the model for the location combo box. That's why I made the combo box editable. I load the combo boxes initially at application startup and as id is only possible for the client to search and book/release a room I didn't thought about it very much.
But I do wonder if an editable combo box is sufficient and I like to ask on how you do cope with this situation?
Joined: May 22, 2007
In my instruction.html is written "
You may assume that at any moment, at most one program is accessing the database file".
So if application is already running , means database file is already in use so even some changes in the database file occur there is no need to update combo boxes but once you restart the application then combo box will be updated.
I do not know is it written in your instruction or not.
Still you fill that there should be update of combo boxes then you can provide Refresh button in your GUI that will do database trip and update the combo boxes .
What Alex means, is something else (i gues): if you have 2 different networked clients and the second one adds a new room/contractor, how will the combo boxes get refreshed, adding the newly added room/contractor.
Alex, correct me if you meant something else.
Allowing user to choose an item from combo or enter some text, is imho a good alternative. Maybe a refresh button after each combo to refresh its content, is also a good approach...