Well, it seems I've coded myself into a corner. My checkboxes don't work, and I don't really know how to make them work in the current framework.

On one hand, I've got some old options table code that creates custom getter and setter functions for the options table and passes the functions to the rest of the code, and on the other hand, I've got the Ace widget library with some callbacks and some API functions.

Which wouldn't normally be such a big deal - since I'm passing functions around, I can just override the functions Ace supplies with the ones from the options table, right?

Well, actually, wrong. Ace recycles widgets, and the function overrides end up creating buggy behavior when a widget is recycled. In addition, the Ace getter and setter functions did some things that still need to be done, so I'm sorta working with functions from different parts of the code fighting over a similar purpose.

So - what am I to do?

Well, perhaps a move towards more MVC-like code. Right now, I have the model (a table) sending the logic that should be in the controller (the functions) to the view (the Ace library). In addition, the Ace library gladly takes code in a completely unknown state and recycles it, pretending it's new code. Which, of course, can lead to unintended side effects.

Pretty much every principle I've learned in computer science has been broken into a million tiny pieces by now.

So - right now, it looks like I need to pull out of the options table idea altogether and rethink how the different parts of code communicate. Passing functions around as if they were variables is cool, but gets in the way when different parts of the code want to do the same thing in different ways. It's time for a clearer separation of concerns in my code.

EDIT: Or I could look at the slider controls and replicate the way they work, since they're already working.