Sunday, July 27, 2014

FMod - Back Button Issues

Gridlock mentioned in an IRC session that he would very much like Abiathar to allow editing of a dependency file after it is created. This is a really difficult problem for me, but of course I can't hide behind my implementation to excuse the lack of a possibly very useful feature.

As I mentioned, there's a Back button now. I have discovered that being able to move back and being able to modify things are very closely related, so I am performing refactoring to make both of those things work better. Specifically, there is now a lot more logic in the "show tab" function. It keeps track of whether a tab has been visited before: if it has, its settings are loaded from the dependency file, otherwise it is given some defaults.

The problem is that it's really hard to keep the tab UI, other dependent tabs' UIs, and the dependency file updated without blowing everything up with a null pointer. When the user can go back and pull a precondition out from under you, the visited list gets confused and tries to load settings that have been deleted from the compound. This is made a lot worse by the UI controls not firing the update event when assigned their current value, which is one of the most subtly terrible bugs ever.

I suppose I'll have to create a "save data" or "on leave tab" handler to manage all the data instead of trusting the update events and Next button to fix everything for me.

No comments:

Post a Comment