Previous Entry Share Next Entry
Release 1.3.3
jducoeur wrote in querki_project
Quick little release today, adding one new feature: the _checkList() function.

For quite a long time, we've had the _editAsPickList() function, which also produces a checklist view. But _editAsPickList(), while grammatically consistent with _edit, turns out to be inflexible, and unable to do all the things I find myself wanting. (I originally developed it to maintain a shopping list, but it doesn't let me do all the nice filter-y things I find myself wanting.) So the new function looks like this:
[[checklist items to show -> prop._checkList(on = thing[, selectedOnly = true])]]
thing.prop should be a Set of Things -- the currently-selected items on the checklist. You feed in the complete list of items to show, and the system displays those as a checklist. You can add or remove Things to thing.prop by checking or unchecking them. The "selectedOnly" flag means, "Only display the items that are *currently* selected".

So for example, the full list (which I use to add stuff) would be something like:
[[Item._instances -> Contents._checkList(on = Basket)]]
But if I'm going to Costco, I could show just the Items to pick up there by saying:
[[Item._instances -> _filter(Store -> _is(Costco)) -> Contents._checkList(on = Basket)]]
That way, it's a checklist of the Items to look for, without anything extraneous.

There is also an optional "display" parameter, so I can say something like:
[[Item._instances -> Contents._checkList(on = Basket, display = _QLLink(Name, _edit))]]
That is, instead of just display the Name (as happens by default), display each item as a link, which when clicked opens up an in-place Editor on that Item. That way, I can tweak Items, add notes, and so on.

I suspect it's not the final word on checklists. But it's considerably more powerful than it used to be, so will hopefully be more useful.

The old _editAsPickList function will be deprecated, and removed before terribly long. I don't think anyone but me was using it, anyway...


Log in

No account? Create an account