Re: [Zope] dtml-in sorting problem

2000-09-29 Thread Michael Bernstein

Tim Cook wrote:
 
 Michael Bernstein wrote:
 
  Here's my problem: I want to sort a list of objects on a property that
  not all items have. So I'm doing this:
 
  dtml-in sort=someProperty,someOtherProperty
 
  The problem is that those items that have a blank someProperty are
  listed first, when I want them at the bottom of the list. I don't want
  to reverse the entire sort order, I just want blank values treated as
  being larger than any other value.
 
 Insert a chr(255) as the first character by default. It'll need
 to be trimmed off if the property becomes populated.

Sounds good, how do I do that?

Michael Bernstein.

___
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] dtml-in sorting problem

2000-09-28 Thread Tim Cook

Michael Bernstein wrote:
 
 Hello all,
 
 Here's my problem: I want to sort a list of objects on a property that
 not all items have. So I'm doing this:
 
 dtml-in sort=someProperty,someOtherProperty
 
 The problem is that those items that have a blank someProperty are
 listed first, when I want them at the bottom of the list. I don't want
 to reverse the entire sort order, I just want blank values treated as
 being larger than any other value.
 
 Any suggestions?

Insert a chr(255) as the first character by default. It'll need
to be trimmed off if the property becomes populated.

-- Tim Cook --
Cook Information Systems | Office: (901) 884-4126 8am-5pm CDT
* It's easy to stop making mistakes. Just stop having ideas.  *
FreePM Project Coordinator http://www.freepm.org
OSHCA Founding Supporter http://www.oshca.org

___
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 )