<HTML><BODY>
<div>When I rewrite the command to tal:replace<SPAN contentEditable=false style="DISPLAY: inline-block"></SPAN> "batch" and surf to it, it displays the object values of every object in the quotes folder. That's what inspired me to measure the len. So, "batch" is not a number, but "num" is, and I've proven this by having the scriptlet print out that number. </div>
<div> </div>
<div>AJ says I shouldn't call all those objectValues into memory. Okay, what's a way around that? I just need the number ;)</div>
<div>TIA,</div>
<div>Tony </div>
<div> </div>
<div><br>
-----Original Message-----<br>
From: lists@zopyx.com<br>
To: maciej.wisniowski@coig.katowice.pl; tonylabarbara@aol.com<br>
Cc: zope@zope.org<br>
Sent: Tue, 13 Mar 2007 1:50 AM<br>
Subject: Re: [Zope] 'int' object has no attribute 'objectValues'<br>
<br>
</div>
<STYLE>
.AOLPlainTextBody {
margin: 0px;
font-family: Tahoma, Verdana, Arial, Sans-Serif;
font-size: 12px;
color: #000;
background-color: #fff;
}
.AOLPlainTextBody pre {
font-size: 9pt;
}
.AOLInlineAttachment {
margin: 10px;
}
.AOLAttachmentHeader {
font: 11px arial;
border: 1px solid #7DA8D4;
background: #F9F9F9;
}
.AOLAttachmentHeader .Title {
font: 11px arial;
background: #B5DDFA;
padding: 3px 3px 3px 3px;
}
.AOLAttachmentHeader .FieldLabel {
font: 11px arial;
color: #000000;
padding: 1px 10px 1px 9px;
background: #F9F9F9;
}
.AOLAttachmentHeader .FieldValue {
font: 11px arial;
color: #000000;
background: #F9F9F9;
}
.AOLAttachmentHeader a, .AOLImage a {
color: #2864B4;
text-decoration: none;
}
.AOLAttachmentHeader a:hover, .AOLImage a:hover {
color: #2864B4;
text-decoration: underline;
}
.AOLWebSuiteCompose .AOLPicturesFullSizeLink,
.AOLWebSuite .AOLPicturesFullSizeLink {
height: 1px;
width: 1px;
overflow: hidden;
}
body {
background-color: white;
font-family: "Verdana";
font-size: 10pt;
border: 0px;
}
.AOLWebSuiteCompose p {
margin: 0px;
padding: 0px;
}
img.managedImg {
width: 0px;
height: 0px;
}
img.placeholder {
width: 275px;
height: 206px;
background: #F4F4F4 center center no-repeat;
border: 1px solid #DADAD6 !important;
}
</STYLE>
<div class=AOLPlainTextBody id=AOLMsgPart_1_fb537558-5e21-45ba-977d-9c643a909a53> <br>
--On 12. März 2007 23:25:59 +0100 Maciej Wisniowski <<A href='javascript:parent.ComposeTo("maciej.wisniowski%40coig.katowice.pl", "");'>maciej.wisniowski@coig.katowice.pl</A>> wrote: <br>
<br>
>> <span tal:define="batch here/quotes/objectValues; num python:len(batch)"> <br>
>> <p tal:replace="python:here.randomNumber(num)" /> <br>
>> </span> <br>
> Check what here/quotes is evaluating to. Seems that it is int. <br>
> <br>
> <br>
<br>
In addition there is no need to call objectValues just to determine the <br>
number of all objects within a container. objectValues() will load <br>
*all objects* of the folder *into memory*. Don't do that. <br>
<br>
-aj <br>
</div>
<!-- end of AOLMsgPart_1_fb537558-5e21-45ba-977d-9c643a909a53 -->
<div class="AOLPromoFooter">
<hr style="margin-top:10px;" />
AOL now offers free email to everyone. Find out more about what's free from AOL at <a href="http://pr.atwola.com/promoclk/1615326657x4311227241x4298082137/aol?redir=http://www.aol.com" target="_blank"><b>AOL.com</b></a>.<br />
</div>
</BODY></HTML>