<HTML><BODY>
<div>When I rewrite the command to tal:replace<SPAN contentEditable=false style="DISPLAY: inline-block"></SPAN>&nbsp;"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>&nbsp;</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&nbsp;</div>


<div>&nbsp;</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>&nbsp;<br>
--On 12. März 2007 23:25:59 +0100 Maciej Wisniowski &lt;<A href='javascript:parent.ComposeTo("maciej.wisniowski%40coig.katowice.pl", "");'>maciej.wisniowski@coig.katowice.pl</A>&gt; wrote:&nbsp;<br>
&nbsp;<br>
&gt;&gt; &lt;span tal:define="batch here/quotes/objectValues; num python:len(batch)"&gt;&nbsp;<br>
&gt;&gt; &lt;p tal:replace="python:here.randomNumber(num)" /&gt;&nbsp;<br>
&gt;&gt; &lt;/span&gt;&nbsp;<br>
&gt; Check what here/quotes is evaluating to. Seems that it is int.&nbsp;<br>
&gt;&nbsp;<br>
&gt;&nbsp;<br>
&nbsp;<br>
In addition there is no need to call objectValues just to determine the&nbsp;<br>
number of all objects within a container. objectValues() will load&nbsp;<br>
*all objects* of the folder *into memory*. Don't do that.&nbsp;<br>
&nbsp;<br>
-aj&nbsp;<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>