Re: [Zope3-dev] Re: RFC: TALES adapters and TAL/Tales variable namespaces
Garrett Smith wrote:
I want to thank everyone who's participating in this thread. The input is extremely valuable.
This might get an award for longest thread before The Edict is handed down ;)
Yeah, and I have to admit being a bemused bystander... I thought we had this whole discussion about 1-2 years ago, and I REMEMBER writing CODE for this back then that involved : as the adapter indicator. Why are we having this whole discussion again? Was there something wrong with the code? :-S Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote: ...
I thought we had this whole discussion about 1-2 years ago, and I REMEMBER writing CODE for this back then that involved : as the adapter indicator.
Yup. We implemented: ob/adapter:name which is equivalent to: ob/adapter:/name and, in fact, you can say just: ob/adapter:
Why are we having this whole discussion again?
Steve pointed out some problems with the syntax, which the above examples should make obvious.
Was there something wrong with the code? :-S
Nope. Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
Jim Fulton wrote:
Yup. We implemented:
ob/adapter:name
...which to me says: "take adapter, apply to it object with name as a parameter" ...what I'd like it to say would give meaning to: my_content_object/zapi:title ...meaning apply the title adapter from the zapi package to my_content_object, which was where I left things last time I came close to understanding Zoppe 3. What's the equivalent to that in today's Zope 3 land?
which is equivalent to:
ob/adapter:/name
and, in fact, you can say just:
ob/adapter:
I'm afraid neither of those means anything to me so your equivalency makes so sense :-S
Steve pointed out some problems with the syntax, which the above examples should make obvious.
Hurm :-S Don't suppose you have a use for that off hand? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
Jim Fulton wrote:
Yup. We implemented:
ob/adapter:name
...which to me says:
"take adapter, apply to it object with name as a parameter"
That's close to the meaning of Even Simpson's Zope 2 ':' extension. Which is why we don't want to use this syntax for adapters.
...what I'd like it to say would give meaning to:
my_content_object/zapi:title
...meaning apply the title adapter from the zapi package to my_content_object, which was where I left things last time I came close to understanding Zoppe 3.
Well, what we did in bristol, enabled: my_content_object/zope:title Which really gets a special adapter named "zope" which exposes zapi-like functionality for ZPT.
What's the equivalent to that in today's Zope 3 land?
What I described still works. But we want to pick a different syntax, like: my_content_object#zope/title
which is equivalent to:
ob/adapter:/name
and, in fact, you can say just:
ob/adapter:
I'm afraid neither of those means anything to me so your equivalency makes so sense :-S
right, which is why we want to pick a different syntax.
Steve pointed out some problems with the syntax, which the above examples should make obvious.
Hurm :-S Don't suppose you have a use for that off hand?
Use for what? Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
How does:
"take adapter, apply to it object with name as a parameter"
That's close to the meaning of Even Simpson's Zope 2 ':' extension. Which is why we don't want to use this syntax for adapters.
...differ from:
Well, what we did in bristol, enabled:
my_content_object/zope:title
Which really gets a special adapter named "zope" which exposes zapi-like functionality for ZPT.
?
I'm afraid neither of those means anything to me so your equivalency makes so sense :-S
right, which is why we want to pick a different syntax.
When I understand the difference, I hope I'll agree :-)
Steve pointed out some problems with the syntax, which the above examples should make obvious.
Hurm :-S Don't suppose you have a use for that off hand?
Use for what?
I wish I could excuse that as a typo :-S "Don't suppose you have a URL for that off hand?" cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
How does:
"take adapter, apply to it object with name as a parameter"
That's close to the meaning of Even Simpson's Zope 2 ':' extension. Which is why we don't want to use this syntax for adapters.
...differ from:
Well, what we did in bristol, enabled:
my_content_object/zope:title
Which really gets a special adapter named "zope" which exposes zapi-like functionality for ZPT.
what we did doesn't supply title as a paramter to the adapter. ...
Steve pointed out some problems with the syntax, which the above examples should make obvious. ...
"Don't suppose you have a URL for that off hand?"
http://dev.zope.org/Zope3/TALESPathExpressionAdapters Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
participants (2)
-
Chris Withers -
Jim Fulton