DSM

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • How to create a new TAL statement?

    5 answers - 371 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all!
    As Aj and Chris advise my to forget the __getattr__ bussiness I try to
    solve the same question by other ways
    Now I have a new question:
    Can you point me to some help about how to create a new TAL statement?
    I would like to create a tal:yanged (for example) statement to control
    how zope give to use some properties
    Thanks!
  • No.1 | | 608 bytes | |

    Garito schrieb:
    Hi all!

    As Aj and Chris advise my to forget the __getattr__ bussiness I try to
    solve the same question by other ways

    Now I have a new question:

    Can you point me to some help about how to create a new TAL statement?

    I would like to create a tal:yanged (for example) statement to control

    <tal:yanged replace="/foo/bar" />

    would work :-) But what are you really trying to do and why?

    Regards
    Tino

    Zope maillist - Zope (AT) zope (DOT) org

    ** No cross posts or HTML encoding! **
    (Related lists -

    )
  • No.2 | | 1200 bytes | |

    Tino Wildenhain :
    Garito schrieb:
    >Hi all!
    >>

    >As Aj and Chris advise my to forget the __getattr__ bussiness I try
    >to solve the same question by other ways
    >>

    >Now I have a new question:
    >>

    >Can you point me to some help about how to create a new TAL statement?
    >>

    >I would like to create a tal:yanged (for example) statement to control
    >

    <tal:yanged replace="/foo/bar" />

    would work :-) But what are you really trying to do and why?

    Regards
    Tino
    Did you read my last thread?

    I'm talking about <tal:anything tal:yanged="/foo/bar" /not <tal:yanged
    tal:replace="/foo/bar" />

    What I need is control the expression far away from the normal way (I
    want to process the result automatically before return the result)

    Aj and Chris dissapoint me to modify the __gettattr__ member of my class
    to make this calculation

    Then I thing I can make this calculation via some tal:statement

    Some idea?

    Thanks!
  • No.3 | | 856 bytes | |

    10/28/06, Garito <garito (AT) sistes (DOT) netwrote:
    Did you read my last thread?

    I didn't, only the message that started this thread. It left me confused.

    I'm talking about <tal:anything tal:yanged="/foo/bar" /not <tal:yanged
    tal:replace="/foo/bar" />

    What I need is control the expression far away from the normal way (I
    want to process the result automatically before return the result)

    Would it suffice to define a new expression type, so you'd have something like

    <something tal:define="result yanged:/foo/bar">

    </something>

    That's something the TALES engine is designed to support. For Zope 3,
    new expression type handlers can be registered with the component
    architecture; I don't remember how it's done in Zope 2.

    -Fred
  • No.4 | | 903 bytes | |

    Garito schrieb:
    Tino Wildenhain :

    I'm talking about <tal:anything tal:yanged="/foo/bar" /not <tal:yanged
    tal:replace="/foo/bar" />

    What I need is control the expression far away from the normal way (I
    want to process the result automatically before return the result)

    Aj and Chris dissapoint me to modify the __gettattr__ member of my class
    to make this calculation

    Then I thing I can make this calculation via some tal:statement

    Some idea?

    Err, what they didnt tell you, its easier to implement get()
    on your method (item access) just like dictionaries.

    This can be used w/ tal path expressions as well.

    No need to fiddle around with extending TAL.

    Regards
    Tino Wildenhain

    Zope maillist - Zope (AT) zope (DOT) org

    ** No cross posts or HTML encoding! **
    (Related lists -

    )
  • No.5 | | 1185 bytes | |

    Tino Wildenhain :
    Garito schrieb:
    >Tino Wildenhain :


    >I'm talking about <tal:anything tal:yanged="/foo/bar" /not
    ><tal:yanged tal:replace="/foo/bar" />
    >>

    >What I need is control the expression far away from the normal way (I
    >want to process the result automatically before return the result)
    >>

    >Aj and Chris dissapoint me to modify the __gettattr__ member of my
    >class to make this calculation
    >>

    >Then I thing I can make this calculation via some tal:statement
    >>

    >Some idea?
    >

    Err, what they didnt tell you, its easier to implement get()
    on your method (item access) just like dictionaries.

    This can be used w/ tal path expressions as well.

    No need to fiddle around with extending TAL.

    Regards
    Tino Wildenhain
    Hi Tino!
    This is exactly what I need. Can you point me better for these solution?
    Some example or some paper explaining how to do it?

    Thanks a lot!

Re: How to create a new TAL statement?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 2 =
QUESTION ON "DSM"

EMSDN.COM