Implements itemsForTag, which involved:
* adding a new method to the entity service to fetch all entities for a predicate
* a caller that does so for useritemtags that have a given tag name and user name
* and collecting the items from those useritemtags.
Now when the omnibar doesn't have any urls, the tokens (tags) it does hold are used to generate a compound search predicate to find all items matching those tags, and it's applied to the item array controller. When it doesn't have anything, the predicate is wiped.
Search for tags starting with a token, not just ones exactly matching.
Update continuously upon text input instead of only on return. This way you get live search results. Results of someone typing in a url would be disastrous.
Probably need to recode this so URLs and tag associations only get parsed on return while tags also get parsed as typed (for searching).
If a search for tags produces zero results, default to showing all results. I needed to put it in an async block because that slight delay gives the search a chance to return before the arrangedObjects count is checked.
Adds a new view controller class for the tag field, since simple binding won't work--it doesn't seem possible to change the input. For now, though, it's just the same functionality moved over, so a tag uneditable tag field bound to the selected object in the view model's item array controller.
Because of the poor VC lifecycle hooks in 10.9 (no viewDidLoad, etc) and the bizarre order in which IB classes are loaded, the window controller needs to tell the tag field controller when the view model is instantiated (so it knows when it can bind). I also moved that moment up to awakeFromNib instead of happening in windowDidLoad.
Switches from binding to raw KVO+KVC so that I can control when the tag field gets updated by the item array controller. Now it only happens when the selected item changes instead of constantly. So it should be possible to start receiving input in the tag field and processing it into the model.