Re: [Zope-dev] manage_changeProperties in a loop

2001-01-17 Thread Arno Gross

On Wed, 17 Jan 2001, Casey Duncan wrote:
> Try this:
> 
> 
>  index="_['sequence-index']">
>   
>   
> 
> 
> Also, why are you passing the folder ids in a string like this? Where
> are these names coming from, a form?

Yes, the names are coming from a from where I can sort the folders for
showing in the desired order.  I know that I can use a list with a SELECTION
tag. But will get only the selected options and I need all the options in the
ordered sequence. Of course I could select programmatically all options before
returning the form and then I could work the list.
But how can I pass the objects instead of the string?
Best wishes
   Arno Gross, [EMAIL PROTECTED]


> If so, there are ways to eliminate the whole string.split. Also, the 
> code would not need to be this complex if the objects
themselves can be > passed instead of a delimited string of ids.
> -- 
> | Casey Duncan
> | Kaivo, Inc.
> | [EMAIL PROTECTED]
> `-->

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] manage_changeProperties in a loop

2001-01-17 Thread Casey Duncan

Arno Gross wrote:
> 
> If I try your suggestion wiht _.getitem(_['sequence-item'])
> (If I remember well this was the first I tried).
> 
> 
> 
>
> 
>   
> 
>   
> 
> 
> I get this error: File
> D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_In.py, line 691, in
> renderwob (Object:  _.string.split(rangList,';'))   File
> D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_With.py, line 133, in
> render (Object: _.getitem(_['sequence-item']))   File
> D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_Util.py, line 337, in
> eval (Object: _.getitem(_['sequence-item']))(Info: _)
> 
> Still any hints. Thanks.

Try this:







Also, why are you passing the folder ids in a string like this? Where
are these names coming from, a form?

If so, there are ways to eliminate the whole string.split. Also, the
code would not need to be this complex if the objects themselves can be
passed instead of a delimited string of ids.
-- 
| Casey Duncan
| Kaivo, Inc.
| [EMAIL PROTECTED]
`-->

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] manage_changeProperties in a loop

2001-01-17 Thread Arno Gross

If I try your suggestion wiht _.getitem(_['sequence-item']) 
(If I remember well this was the first I tried).

 
 


   
  
   
  

I get this error: File
D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_In.py, line 691, in
renderwob (Object:  _.string.split(rangList,';'))   File
D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_With.py, line 133, in
render (Object: _.getitem(_['sequence-item']))   File
D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_Util.py, line 337, in
eval (Object: _.getitem(_['sequence-item']))(Info: _)


Still any hints. Thanks.



On Tue, 16 Jan 2001, Steve Alexander wrote:
> Arno Gross wrote:
> 
> > Suppose I have a list of existing folder objects and depending
> > on their index in the list I want to set a property called 'rang'.
> > 
> > I assumed you could something like this:
> > 
> > 
> >  
> > (normally the list comes from outside)
> > 
> >
> >  
> 
> Here, you're getting an item with the literal id 'sequence-item'.
> 
> What you mean is to get the item with the id described by the variable 
> sequence-item. So, use:
> 
>  
> 
> Hope that helps.
> 
> 
> This really is a [EMAIL PROTECTED] question, not a [EMAIL PROTECTED] 
> question. Please do try to choose the appropriate list for the question. 
> Thanks.
> 
> --
> Steve Alexander
> Software Engineer
> Cat-Box limited
> http://www.cat-box.net

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] manage_changeProperties in a loop

2001-01-16 Thread Steve Alexander

Arno Gross wrote:

> Suppose I have a list of existing folder objects and depending
> on their index in the list I want to set a property called 'rang'.
> 
> I assumed you could something like this:
> 
> 
>  
> (normally the list comes from outside)
> 
>
>  

Here, you're getting an item with the literal id 'sequence-item'.

What you mean is to get the item with the id described by the variable 
sequence-item. So, use:

 

Hope that helps.


This really is a [EMAIL PROTECTED] question, not a [EMAIL PROTECTED] 
question. Please do try to choose the appropriate list for the question. 
Thanks.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )