[Zope] Squishdot Error on Zope 2.6.0
Andy McKay
andy@agmweb.ca
Mon, 28 Oct 2002 08:16:00 -0800
> if you don't like try/except you can use the well-known catalog APIs
> for determining the IDs of metadata columns and indices.
Actually there isnt a well known API for checking against catalog indices
(unless I missed it the other day). You'd think there'd be a simple
catalog.hasColumn('foo') call, but there isnt. Instead you have to do
catalog._catalog.schema.has_key('foo').
> you're correct, ZCatalog has seen many changes. but instead of giving
> up and hardcoding an expected environment just a couple more lines of
> code can go a long way towards ameliorating the impact of those changes.
Sure, we'd all like perfect code but trying to hit a moving target like Zope
is hard. Ideally yes everyone would rather write a function that is perfect
and ideal, but when you change something in Zopes basic API that has been
unchanged for something like 2 years products are going to break, live with
it.
In the world of product authors producing products in their spare time its
hard to get a product out all, never mind trying to maintain it as Zope
changes.
--
Andy McKay
www.agmweb.ca