[Zope] Referring to a total-xxx variable

2000-06-14 Thread icottee



Following on from my last posting I seem to have made a lot of progress -
although still not sure if what I have done is the right thing or not. However,
please somebody put me out of my misery. In the following code snippet the
dtml-var part works fine. How can I, therefore,  add count-id to v_allItems? It
seems to think I am trying to do subtraction. I've spent a couple of hours
trying to find the mystical incantation.

dtml-in "PARENTS[0].objectValues(['TimeSheet'])"

   dtml-var count-id

   dtml-call "REQUEST.set('v_allItems', v_allItems + count-id)"

/dtml-in

Ian Cottee
Nagoya, Japan



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Referring to a total-xxx variable

2000-06-14 Thread Andrew Kenneth Milton

+[ [EMAIL PROTECTED] ]-
| 
| 
| Following on from my last posting I seem to have made a lot of progress -
| although still not sure if what I have done is the right thing or not. However,
| please somebody put me out of my misery. In the following code snippet the
| dtml-var part works fine. How can I, therefore,  add count-id to v_allItems? It
| seems to think I am trying to do subtraction. I've spent a couple of hours
| trying to find the mystical incantation.

Replace this

|dtml-call "REQUEST.set('v_allItems', v_allItems + count-id)"

with this

 dtml-call "REQUEST.set('v_allItems', v_allItems + _['count-id'])"

try to avoid hyphens in variable names as much as possible, it tends to
get messy.

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Referring to a total-xxx variable

2000-06-14 Thread Shalabh Chaturvedi

Hi:

Instead of
dtml-call "REQUEST.set('v_allItems', v_allItems + count-id)"

try:

dtml-call "REQUEST.set('v_allItems', v_allItems + _['count-id'])"
The _ is the 'current namespace' dictionary.

Another way would be to do this:

dtml-let ci=count-id
  dtml-call "REQUEST.set('v_allItems', v_allItems + ci )"
/dtml-let

Hope this helps,
Shalabh


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 15, 2000 9:43 AM
Subject: [Zope] Referring to a total-xxx variable




 Following on from my last posting I seem to have made a lot of progress -
 although still not sure if what I have done is the right thing or not.
However,
 please somebody put me out of my misery. In the following code snippet the
 dtml-var part works fine. How can I, therefore,  add count-id to v_allItems?
It
 seems to think I am trying to do subtraction. I've spent a couple of hours
 trying to find the mystical incantation.

 dtml-in "PARENTS[0].objectValues(['TimeSheet'])"

dtml-var count-id

dtml-call "REQUEST.set('v_allItems', v_allItems + count-id)"

 /dtml-in

 Ian Cottee
 Nagoya, Japan



 ___
 Zope maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Referring to a total-xxx variable

2000-06-14 Thread icottee



Many thanks to both you and Andrew. I should really sit down and write out all
the different ways of reffering to variables and learn them properly.

I had tried to use something similar to

dtml-let ci=count-id
  dtml-call "REQUEST.set('v_allItems', v_allItems + ci )"
/dtml-let

and I thought it hadn't worked. However, just tried again and it does so I am
obviously loosing the plot.

Many thanks for your help

Ian Cottee
Nagoya, Japan



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )