Re: The difference between getattr and restrictedTraverse

2007-06-10 Thread Tim Hicks
Martin Aspeli wrote: >> I take your point. In response to your "why should a (weblog entry) >> object 'know' what its display url is?", I'd say "because people expect >> it to". That is, 'absolute_url' is the recognised way of retrieving an >> object's url. In essence, my question to you might

Re: The difference between getattr and restrictedTraverse

2007-06-10 Thread Tim Hicks
Tom Lazar wrote: > On Jun 10, 2007, at 1:51 PM, Tim Hicks wrote: > >> This compares to what I envisage the view approach looking like:: >> >> >> >tal:attributes="href weblogentryview/getArchiveURL" >>tal:content="brain/Title">title >> > > except that i wouldn't do the 'b

Re: The difference between getattr and restrictedTraverse

2007-06-10 Thread Martin Aspeli
Hi Tim, Tim Hicks wrote: Tom Lazar wrote: What I'm trying to do now is make it so that methods on my weblog object will return lists of IWeblogEntry-ish objects that know what sort of URL they should have. That way, I can call IWeblog.getLazyEntries(), which does a catalog search for appropri

Re: The difference between getattr and restrictedTraverse

2007-06-10 Thread Tom Lazar
On Jun 10, 2007, at 1:51 PM, Tim Hicks wrote: This compares to what I envisage the view approach looking like:: title except that i wouldn't do the 'brains dance' inside the template but in the view class. i've adopted the practice of only passing out dictionaries or adapted o

Re: The difference between getattr and restrictedTraverse

2007-06-10 Thread Tim Hicks
Tom Lazar wrote: >> What I'm trying to do now is make it so that methods on my weblog object >> will return lists of IWeblogEntry-ish objects that know what sort of URL >> they should have. That way, I can call IWeblog.getLazyEntries(), which >> does a catalog search for appropriate IWeblogEntry

Re: The difference between getattr and restrictedTraverse

2007-06-10 Thread Tom Lazar
hi tim, hi martin, et. al. just finally catching up on this list after the PIKtipi sprint, so i'm chiming in a bit late here... On Jun 1, 2007, at 4:21 PM, Tim Hicks wrote: What I'm trying to do now is make it so that methods on my weblog object will return lists of IWeblogEntry-ish object