Author: ben
Date: 2007-07-09 12:47:21 -0700 (Mon, 09 Jul 2007)
New Revision: 5634
Modified:
sandbox/ben/smush/classes.lzx
sandbox/ben/smush/main.lzx
Log:
started using instead of lame workaround for when I couldn't remember
Modified: sandbox/ben/smush/classes.lzx
===================================================================
--- sandbox/ben/smush/classes.lzx 2007-07-09 19:23:06 UTC (rev 5633)
+++ sandbox/ben/smush/classes.lzx 2007-07-09 19:47:21 UTC (rev 5634)
@@ -2,15 +2,15 @@
<!-- merged by ben -->
<class name="rssimage" clip="true" >
- <text name="urlText" datapath="content/@url" visible="false"/>
- <text name="guid" datapath="guid/text()" visible="false"/>
+ <attribute name="urlText" value="$path{'content/@url'}"/>
+ <attribute name="guid" value="$path{'guid/text()'}" />
<view name="thumbnail" bgcolor="0xAABB00" stretches="both"
width="${parent.width}" height="${parent.height}" />
<method event="onclick">
this.setSelected(true);
</method>
<method name="loadThumbnail">
- this.thumbnail.setSource(this.urlText.text);
+ this.thumbnail.setSource(this.urlText);
</method>
<method name="setSelected" args="s" >
@@ -29,10 +29,9 @@
x="4" y="8"
width="${parent.width-8}"
datapath="title[1]/text()" multiline="false" />
- <text name="content" datapath="description/text()" visible="false" />
-
- <text name="link" datapath="link/text()" visible="false"/>
- <text name="guid" datapath="guid/text()" visible="false"/>
+ <attribute name="content" value="$path{'description/text()'}"
type="string" />
+ <attribute name="link" value="$path{'link/text()'}" type="string"/>
+ <attribute name="guid" value="$path{'guid/text()'}" />
<method name="setSelected" args="s" >
if ( s ) {
Modified: sandbox/ben/smush/main.lzx
===================================================================
--- sandbox/ben/smush/main.lzx 2007-07-09 19:23:06 UTC (rev 5633)
+++ sandbox/ben/smush/main.lzx 2007-07-09 19:47:21 UTC (rev 5634)
@@ -62,7 +62,7 @@
options="ignorelayout" >
<method name="showImage" args="item">
this.currentImageSelection = item;
- this.imgpreview.setSource(item.urlText.text);
+ this.imgpreview.setSource(item.urlText);
this.checkForMatch();
</method>
<method name="showTitle" args="item">
@@ -75,8 +75,8 @@
// only check for a match if both a headline and an image have
been selected
if ((("currentTitleSelection" in this) && ("currentImageSelection"
in this))
&& (this.currentTitleSelection != null) &&
(this.currentImageSelection != null)) {
- var titleGuid = this.currentTitleSelection.guid.text;
- var imageGuid = this.currentImageSelection.guid.text;
+ var titleGuid = this.currentTitleSelection.guid;
+ var imageGuid = this.currentImageSelection.guid;
if (titleGuid == imageGuid) {
gResult.showResult(true);
} else {
@@ -111,7 +111,7 @@
this.setY( v.getAttributeRelative('y',canvas) );
this.setWidth(v.width);
this.setHeight(v.height);
- this.image.setSource(v.urlText.text);
+ this.image.setSource(v.urlText);
this.setVisible( true );
animSlide.doStart();
</method>
@@ -174,8 +174,8 @@
if (this.matched) {
this.nomatch.setVisible(false);
gMoreInfo.title.setText(gDetails.currentTitleSelection.title.text);
-
gMoreInfo.txt.setText(gDetails.currentTitleSelection.content.text);
-
gMoreInfo.img.setSource(gDetails.currentImageSelection.urlText.text);
+ gMoreInfo.txt.setText(gDetails.currentTitleSelection.content);
+
gMoreInfo.img.setSource(gDetails.currentImageSelection.urlText);
gMoreInfo.show();
}
</method>
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins