[Grok-dev] Re: Cancel button in forms
Brandon Craig Rhodes
brandon at rhodesmill.org
Mon May 5 13:15:43 EDT 2008
Martijn Faassen <faassen at startifact.com> writes:
> Brandon Craig Rhodes wrote:
>> Well, strings that represent absolute URLs in the Zope framework
>> should already come marked with the IAbsoluteURL interface, right? :-)
> Marking up a string? It sounds like you're talking about a URL
> object abstraction as opposed to a string?
No, I was talking about marking the string. I had never actually
tried it before, and am disheartened to discover that it results in:
AttributeError: 'str' object has no attribute '__provides__'
So unless I can teach zope.interface about how to mark up types
without mutable __dict__'s, maybe it's impossible to declare that a
string provides an interface. How disappointing. So there's no way
to know what properties a string being passed around in Zope has. :-/
> Anyway, IAbsoluteURL is a multi adapter of context and request, like
> a view.
I think you're maybe confusing IAbsoluteURL, which is an interface,
with the adapter defined in zope.traversing.browser.absoluteurl?
Brandon Craig Rhodes brandon at rhodesmill.org http://rhodesmill.org/brandon
More information about the Grok-dev