[Grok-dev] object relationships
jmichiel at yahoo.com
Mon Mar 2 08:45:39 EST 2009
I'm still working on one, but I'm doing it in my free time (which is hard to
come by these days), so bear with me, please...
Vanderson Mota dos Santos wrote:
> Sorry for ressurecting the topic, but please, a tutorial of Object
> Relationships is needed, because for now, object relationships are not so
> straightforward and fast to make as could/should be, IMHO.
> 2009/2/13 Martijn Faassen <faassen at startifact.com>
>> I'm glad the basics work now. I was able to encapsulate the choice
>> behavior quite nicely without too little code. The trick was to derive a
>> new RelationChoice field so that the relation is actually indexed
>> properly and so you can pass a source to it. The other trick was to
>> create a new source factory that you can easily supply with a list of
>> Jeroen Michiel wrote:
>> > I still have a small issue if I want to remove my app:
>> > File
>> > line 36, in removeRelations
>> > catalog = component.getUtility(ICatalog)
>> > File
>> > line 207, in getUtility
>> > raise ComponentLookupError(interface, name)
>> > ComponentLookupError: (<InterfaceClass
>> > It seems the catalog is unregistered before the objects are removed, or
>> > something of that nature...
>> Yes, it must be some deregistration order issue. I've seen those before
>> in other contexts.. I think the issue could be fixed by placing some
>> fallback behavior in event.py so that if the catalog is missing things
>> will proceed without error. Send me a patch or remind me to look at it
>> again. :)
>> > At least I can write a nice how-to now!
>> > BTW: I had already found a nicer way to use a regular choice field with
>> > relation than what I described before, but I'll put it in the how-to as
>> > well.
>> I'd be interested in learning about this too.
>> > Speaking of how-to's: I already made a how-to on zc.sourcefactory that
>> > submitted for reviewing, but it hasn't been reviewed yet. Do I need to
>> > anything more? Or is this no longer the way how-to's should be
>> Oh, just make noise on this list when you have something to review, I
>> don't think we have people watching what there is to review...
>> I'll look at it now. That looks like a very nice introduction, so I'll
>> publish it right away. Thanks very much for writing it, I think people
>> will be helped by this.
>> Grok-dev mailing list
>> Grok-dev at zope.org
> Vanderson Mota dos Santos
> Grok-dev mailing list
> Grok-dev at zope.org
View this message in context: http://www.nabble.com/object-relationships-tp21706997p22288359.html
Sent from the Grok mailing list archive at Nabble.com.
More information about the Grok-dev