[Zope] Error Value: sequence-var-get_size
Dieter Maurer
dieter@handshake.de
Wed, 20 Nov 2002 20:11:09 +0100
Zoper writes:
> ...
> <dtml-var sequence-var-get_size> bytes</td> <td>
> ...
>
> but whenever I try to run it I get an ugly Zope message:
> "This resource may be trying to reference a nonexistent object or
> variable sequence-var-get_size".
> What is the problem?
There are objects that do not have a "get_size" method (e.g. Folder,
Database Adapter, External Methods).
Check whether it exists before you use it.
<dtml-if sequence-var-get_size>
<dtml-var sequence-var-get_size> bytes
</dtml-if>
This will give you nothing for objects with size 0.
But, this might not be a problem for you.
If it is, you must use '<dtml-if expr="_.has_key('sequence-var-get_size')">'.
Dieter