7 Jun 14:29
Re: repeat through hash
> On Thursday 20 April 2006 17:29, Jonathan Vanasco wrote:
> > On Apr 20, 2006, at 7:24 PM, Corey wrote:
> > > Anyone in favor? Any pitholes or details I'm missing?
> >
> > Well there's this:
> > in Perl, Python and PHP (the TAL implementations I use ), hashes
> > ( perl hashes, python dicts , php named arrays ) are unordered.
> > randomly showing items from a list, IMHO, is worthless and confusing.
> >
>
> True. And I agree that, from a presentation standpoint, randomly displaying
> items from an unordered list is not always useful or sensical - however there
> are certainly plenty of instances/use-cases where an ordered presentation
> is not in fact necessary, or where there truly is no criteria from which to sort
> by anyways. ( I'm currently writing an app in which this is the case. )
1.a
I've always wanted petal to be perl'ier, and less TAL'ish.
<select name="perly">
<option petal:repeat="a [sort [{BLOCK}] keys myHash]"
petal:attributes="value="a" petal:content="myHash/a" />
</select>
1.b
Of course, to see just how far I'd like it to go, I'd like to see it
more like:
(Continue reading)
RSS Feed