[TurboGears] Re: setlike behavior

2006-02-05 Thread Kevin Dangoor

There's a question in your patch about setlike. The purpose of the
setlike class is to act like a set (things only appear once), but
remember the order that things were added in. setlike is a bad name,
but orderedset isn't such a great idea either.

setlike exists specifically for handling JSLink, CSSLInk, etc.
objects. You only want them to appear once per page, but you want them
to appear in the order requested (because it matters sometimes).

Kevin

On 2/5/06, Alberto Valverde [EMAIL PROTECTED] wrote:

 I've posted a patch for the new widgets API which you can use to
 avoid it:

 http://trac.turbogears.org/turbogears/attachment/ticket/490/
 newbase_widget_vars.2.patch

 The discussion is at:

 http://trac.turbogears.org/turbogears/ticket/490

 Hope i helps,

 Alberto.
 On Feb 5, 2006, at 1:09 PM, Max Ischenko wrote:

  1. I don't like been forced to write boilerplate code like this:
  def update_data(self, d):
  d['headers'] = self.headers
  d['collist'] = self.collist
  d['getcol'] = self.getcol




--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com


[TurboGears] Re: setlike behavior

2006-02-05 Thread Bob Ippolito


uniquelist describes what it means better than orderedset does...  
orderedset usually means something else.


-bob

On Feb 5, 2006, at 2:09 PM, Kevin Dangoor wrote:



There's a question in your patch about setlike. The purpose of the
setlike class is to act like a set (things only appear once), but
remember the order that things were added in. setlike is a bad name,
but orderedset isn't such a great idea either.

setlike exists specifically for handling JSLink, CSSLInk, etc.
objects. You only want them to appear once per page, but you want them
to appear in the order requested (because it matters sometimes).

Kevin

On 2/5/06, Alberto Valverde [EMAIL PROTECTED] wrote:


I've posted a patch for the new widgets API which you can use to
avoid it:

http://trac.turbogears.org/turbogears/attachment/ticket/490/
newbase_widget_vars.2.patch

The discussion is at:

http://trac.turbogears.org/turbogears/ticket/490

Hope i helps,

Alberto.
On Feb 5, 2006, at 1:09 PM, Max Ischenko wrote:


1. I don't like been forced to write boilerplate code like this:
def update_data(self, d):
d['headers'] = self.headers
d['collist'] = self.collist
d['getcol'] = self.getcol






--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com