[Zope] increment value of self
   
    Davis Marques
     
    davis@mccalldesign.com
       
    Wed, 11 Dec 2002 14:20:19 -0800
    
    
  
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C2A120.6FB2CF10
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
I'm having a lot of problems with this one . I have an object (A) that
has a method called increment, and a variable in the Basic propertysheet
called count.  I'd like other objects to be able to call that method, so
that the A object increments the value of count + 1 when requested.
 
The problem I'm having is that any other variables present in REQUEST
are then also assigned to A.
 
Here's what I have so far:
 
"""
increment
"""
 
c = context.count + 1
context.REQUEST.set('count',c)
context.propertysheets.Basic.manage_editProperties(context.REQUEST)
 
------=_NextPart_000_0001_01C2A120.6FB2CF10
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I’m having a lot of problems with this one =
… I
have an object (A) that has a method called increment, and a variable in =
the
Basic propertysheet called count.  I’d like other objects to =
be able
to call that method, so that the A object increments the value of count =
+ 1
when requested.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The problem I’m having is that any other =
variables present
in REQUEST are then also assigned to A.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Here’s what I have so far:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>“””</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>increment</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>“””</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>c =3D context.count + 1</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>context.REQUEST.set(‘count’,c)</span></fon=
t></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>context.propertysheets.Basic.manage_editProperties(con=
text.REQUEST)</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
</div>
</body>
</html>
------=_NextPart_000_0001_01C2A120.6FB2CF10--