On Thu, 28 Apr 2005, Asad Habib wrote:

> I have a session variable called 'undergraduateProjectsDirected' that I
> declare using the following syntax:
> 
> <dtml-call "REQUEST.SESSION.set('undergradProjectsDirected', [ ])">
> 
> When I try to append items to this list variable, I get the following
> error:
> 
> AttributeError: 'NoneType' object has no attribute 'append'
> 
> I know for a fact that this variable exists since flushing the SESSION
> attribute of the REQUEST variable using <dtml-var "REQUEST.SESSION">
> yields its name and shows that it is initially empty.
> 
> I am using the following statement to append items:
> 
> <dtml-call 
> "(REQUEST.SESSION.get('undergraduateProjectsDirected')).append([student_name, 
> description])">
> 
> The strange thing is that when I change the name of this variable to
> 'undergradProjectsDirected', the error does not occur anymore.

Once you get beyond this problem, you may want to think about persistence 
issues.  See The Zope Book for details.   The list probably should be an 
instance of a PersistentList and you should use the copy-out/copy-in 
technique described in the API and in the Developers Guide.


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to