[Zope] 2Q: Catalog and REQUEST

2001-01-17 Thread alan runyan

I have a calendar each day is a radio button and the name=schedule_mmdd
when I post to a page I want to do something like, get all the values that
start with 'schedule'.  I found no examples on how to
iterate over the REQUEST objects values.  anyone?

times=[]
for key in REQUEST['form'].keys():
   if key[:8]=='schedule':
  times.append(REQUEST['form'][key])

second question:  I have some searchResults()
when I say
dtml-in searchResultdtml-var sequence-item/dtml-in (when are we going
to get rid of sequence-item?)
I get
instance
None
instance
instance
instance


but dtml-in searchResults
dtml-if "_['sequence-item']!=None"
   dtml-var sequence-item/dtml-if
  /dtml-in
doesnt work.

running on the latest beta, really nice :)

~runyaga





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




Re: [Zope] 2Q: Catalog and REQUEST

2001-01-17 Thread Dieter Maurer

alan runyan writes:
  for key in REQUEST['form'].keys():
"form" is an attribute (!) of REQUEST, not a key:

   for key in REQUEST.form.keys():

  second question:  I have some searchResults()
  when I say
  dtml-in searchResultdtml-var sequence-item/dtml-in (when are we going
  to get rid of sequence-item?)
  I get
  instance
  None
  instance
  

  but dtml-in searchResults
  dtml-if "_['sequence-item']!=None"
Do you get a NameError None?
You need (probably, depending what type of objects you
"searchResult" returns) "_.None".


Dieter

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