just b/c I've been messing around I want to have this to separate out any of the messing around form the routing stuff coming up next
I can tentatively say the route matching algo is finished. the version in TemplarJS.js is not the finished one. have to move the non-signature-based one into the project.
added endOfChain prop to route chain to catch patterns that start off matching but do not complete the pattern. for instance /a/b/r/ should not match 'a/b/c:d/e:f'
route ambiguity detection completed
normalized routes resolution and tree keys to lowercase
killed linked list and now build tree on first pass of route definitions
I think this is the final version of the route pattern matching algo. removed all the complicated lookahead stuff
moved page limiting out of interpolation and into getAttribute()
paging and live filtering now working on new partial load. also paging is working
now firing onload before bindingModel(). This is so change handlers will be fired AFTER the template onload is run. This is ideal for a situation where live filters are set in attrib listeners onload. For example we want to use the value of a select as a by() param to a live filter. Now the listener to the select is loaded into the system before bindModel(). When bind model does the inital interp of the model, the listener on the select will fire binding the live filter.
sorting by page is now been changed to sort the current page. had to change sort.insertSortedSlice() to temporarily set limit to 0 to trick getAttribute() into giving it the full attrib. This is necessary since I moved slice recognition to getAtrribute() and out of interpolate(). getAttribute() will always give you the correct page slice if limit has been set > 0.
created system events, namely an event notifying the system that the model has been bound and interpolated. It's main use at this time is fire the binding of listeners the client has placed on controls. These controls may not be drawn yet. This was a trade off. I needed to fire partial onloads to get the clients model attrib listeners registered before interpolation. Once these are registered they would be fired on initial interpolation. This would enable things like live filters that depend on the inital value of a select. Without this technique these listeners would not be bound, thereby making them very dead. I wanted to avoid having users declare listeners twice so this solution worked nicely. That was until, I realized that any control listeners placed in partial onloads would fire before repeats were drawn. So any controls in those repeats wouldn't exist when the client attemped to bind listeners to the repeated control or any of it's child components. The solution was to create system events. Now the system alerts when bindModel() is done. This means all repeats are drawn and everything has been initially interpolated. Notice the use of closures to save the inital state of the client's initial calls to Control.listenTo() and Control.listen().
can now have multiple instanes of a repeat on a page. Had to move the repeat destruction out of the repeat buildin loop or else all repeats would be destroyed on every base node leaving only the last repeat to be drawn