Attached patch does two things: 1) Makes TLookupList.FList protected instead of private 2) Adds new TLookupList methods to access all values and to find key by value
These are required to implement picklist editor for lookup fields in DBGrid component of Lazarus, see: http://bugs.freepascal.org/view.php?id=12347 http://wiki.lazarus.freepascal.org/Lazarus_0.9.26_todo (where this feature was once targeted for 0.9.26, but postponed) and a recent thread in Lazarus mailing list. Note that although the code is rather straightforward and was copied almost directly from the patch in the bug report above, it was only compile-tested. This is because the existing db test suite (fcl-db\tests) gives many failures, so I hestitate to add more tests until those are resolved. -- Alexander S. Klenin Insight Experts Ltd.
db_lookuplist.patch
Description: Binary data
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel