[Zope] problem with lines properties

Jim Washington jwashin@vt.edu
Mon, 09 Apr 2001 09:28:23 -0400


Hi, Tim

You might have to do some processing of your ZClass add-form data.  I
would recommend string.split()ing it and making a list before doing
manage_changeProperties(), just to be sure.

Lines properties can accept '\n' (i.e., new line) delimited strings or
lists.  My guess is that somehow you are initializing with something
delimited differently, which is not recognized properly.  Once it gets
into the instance and onto the property sheet, Zope works to display it
in a format that is correct, and a "save changes" makes it all proper.

hth,

-- Jim Washington

Timothy Wilson wrote:
> 
> On Sun, 8 Apr 2001, Jim Washington wrote:
> 
> > Are you putting the data into the "lines" properties programmatically?
> > What does that code look like?
> 
> No, I'm just entering them from the normal ZClass add form. Nothing
> fancy. The product I'm working on will keep track of our school's lunch
> menus. So I have a property lunch_menu that might contain:
> 
> veal shank
> potato salad
> baked beans
> celery sticks
> 
> (Not necessarily those items :-)
> 
> The menu is rendered like this:
> 
> <h2>Lunch</h2>
> <ul>
>  <dtml-in lunch_menu>
>   <dtml-let item=sequence-item>
>    <li><dtml-var item></li>
>   </dtml-let>
>  </dtml-in>
> </ul>
> 
> As I said, this doesn't work until I edit the instance and simply click on
> the "save changes" option. Weird.