Spry 1.6.1 released to Labs

Hi Spry:fans,

I wanted to talk about our freshly released Spry 1.6.1 update.

This release was based on changes we wanted to do to be compatible with the just released AIR 1.0. We needed to make some changes to the way our processing worked. That plus the raft of big fixes we made, plus the new Rating widget, deemed that we update the zip so everyone has the latest.

So as far as Spry and AIR go, the big things are: We can’t run eval() in the AIR space . This means that any spry:if or spry:test can’t be run directly. Also, adding event handlers after the onLoad event won’t work. So all onclick=”ds1.setCurrentRow():” type of things have to be done using an onPostUpdate REGION observer.

http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html

The solution we used also solved a long standing data issue and gives developers a great deal of flexibility with their data references.

A spry:if can now be handled with something like:

<script>

function checkName(rgn, doIt)
{
return doIt(‘{name}’) == ‘Adobe Photoshop’;
}

</script>

<div spry:if=”function::checkName”>

But even better is that you can make custom data references like so:

<script type=”text/javascript”>

function FormattedPrice(region, lookupFunc)
{
return “$” + parseInt(lookupFunc(“{ds1::price}”)).toFixed(2);
}
</script>

<div spry:region=”ds1″>
<ul spry:repeatchildren=”ds1″>
<li>{name} – {function::FormattedPrice} </li>
</ul>
</div>

Notice the {function::FormattedPrice} data ref. This method allows you to easily do data formatting!

We have added a simple sample that shows this working, and have updated the API docs to explain this new methodology.
http://labs.adobe.com/technologies/spry/samples/data_region/Function_colon.html

As I have posted before, we also are releasing the Rating widget for real.

Also, check out some of the good fixes in the Changelog.
http://labs.adobe.com/technologies/spry/ChangeLog.html

Thanks,

Don