You are not logged in Log in Join
You are here: Home » Members » 4AM Productions (Evan Simpson) » DTMLWiki » GenericMethod » wikipage_view

Log in
Name

Password

 
 
FrontPage » EvolutionaryProposals »

GenericMethod

Problem Space

At some point, zope will have arbitrary callable methods. Currently there are DTML methods, Python methods, External Methods and SQL Methods (though the Python Methods may be objects unto themselves), and at some point in the future there will be methods from other languages.

Current Approach

Right now, Python methods and External Methods have to be called as <dtml-call expr="foo(x,y,z)">, which seems not at all in line with the SGML-derived approach.

jeffrey - yes! exprs == evil! especially when it comes to working with other editors (primarily text, but also smarter "visual" ones). And in thinking with XML, strictness is good. Make them say x="10".

Possible Alternative

Why not do <dtml-method name="foo" x y z> where x y and z are already defined in the current namespace, or

<dtml-method name="foo" x=10 y="string" z=5.03> when x, y, and z are not defined in the current namespace, or you want to override them?

This could be more than a one-off tag, too:

<dtml-method name="foo" x y z>

You have <dtml-var returned-value1> apples, <dtml-var returned-value2> oranges, and <dtml-var returned-value3> kumquats.

</dtml-method>

and yes, dtml-method is a confusing name: it could be called something else.

-- MindLace