Friday, November 9, 2007

Refactoring, rewriting...

So yesterday, I became very frustrated because my LazyFilteringSelects (some of them) weren't loading right. So I thought about things some more, and decided to do two things today.

The first is rewrite the _list pcgis to use CS3::SimpleDojoList. This is just to make sure they're all outputting their JSON in a uniform way - it helps reduce typos. Also, it makes the code very, very slightly cleaner. So that's done now.

The second is to rethink LazyFilteringSelect. I'm making it less generic (it will only make sense for ItemFileReadStores, and you pass it a URL instead of a function that generates a store) and it does an XhrGet to retreive the data rather that entrusting that to the store, so that it can publish loadStarted and loadFinished events and do something intelligent with errors. The store api is lacking.

No comments: