The c4_OrderedViewer::KeyCompare method used in c4_OrderedViewer::find assumes that
the properties in the search criteria are in the same order as the properties
in the view. The PyView_find function constructs search criteria with the properties
in an order that depends on the Python built-in dictionary hash function. This
means that it is sheer luck if the criteria properties order matches the underlying
view order.
I've attached a test program demonstrating the problem and a patch for PyView.cpp
that corrects the behavior. The test program demonstrates that the patch corrects
the behavior. The patch should be run from the parent metakit-2.4.9.4 directory
(i.e. the parent of the python directory). |