Rightpoint / RZCellSizeManager

Dynamic size computation and caching for cells.
MIT License
242 stars 32 forks source link

Get rid of redundancy between initialization / register methods? #7

Closed ndonald2 closed 10 years ago

ndonald2 commented 10 years ago

It seems like the various initialization methods are pretty much unnecessary now that you can register a cell class after init. Multiple and/or complex initializers are good for mandating arguments that can't be configured or changed later. But since nearly all of the init methods just call one of the registration methods anyway, it seems sort of redundant.

I'm wondering if the interface might be made more intuitive or cleaner by just getting rid of all the init methods and using only the registration methods? There would need to just be a few small changes to the registration methods but I think it would simplify the interface quite a bit.

Let me know if you agree and I can take a stab at this.

alexrrouse commented 10 years ago

Agree 100%. As it has been getting more complex I think the register way is definitely the way that we should be using it.

If you have time to refactor it please do. If not I'm sure I can get to it one of these days.