Re: [Zope3-dev] Re: Source API

2005-09-11 Thread Stuart Bishop
Fred Drake wrote: I think the ISourceItem is important, as it allows people to extend what is being returned by their sources. In particular, we would have IIterableSource sources that return IRichSourceItem which also provides a snippet() method or view. This would provide an XHTML fragment

Re: [Zope3-dev] Re: Source API

2005-09-11 Thread Fred Drake
I wrote: The current ITerms approach for sources makes terms essentially views on the values from the source, so that's a good way to provide things like XHTML snippets that can be used in the UI. On 9/11/05, Stuart Bishop [EMAIL PROTECTED] wrote: So lets say I have a Source that provides

Re: [Zope3-dev] Re: Source API

2005-09-06 Thread Fred Drake
On 9/6/05, Stuart Bishop [EMAIL PROTECTED] wrote: It was more problematic in the Vocabulary code, because IVocabulary extended IIterableVocabulary, forcing all vocabularies to implement that interface. Sources give us the opportunity to reverse and fix that, making IIterableSource extend

Re: [Zope3-dev] Re: Source API

2005-09-06 Thread Gary Poster
On Sep 6, 2005, at 11:21 AM, Fred Drake wrote: ... I agree with what Fred said. Gary ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

[Zope3-dev] Re: Source API

2005-09-06 Thread Gary Poster
On Sep 6, 2005, at 1:08 AM, Stuart Bishop wrote: ... So the only thing I think needs changing here is the documentation suggesting returning maxint from __len__. ... While I think there is agreement on this, have we settled in on a solution? Raising NotImplementedError or some other error

[Zope3-dev] Re: Source API

2005-09-05 Thread Stuart Bishop
Gary Poster wrote: The use case we are trying to address with the iterable source interface is that we want to be able to distinguish between sources that should be searched, and those that should be displayed as explicit choices. I'll call these 'searchable' and 'showable' sources and