This morning I wired together the blog reader (Actually, it only reads my blog right now!), which was pretty easy once I groked how pointers inside of datapath worked.
Of course, you can point this app at your RSS 2.0 feed by changing the src attribute in the
<canvas width=”850″ height=”550″>
<!– DATA –>
<dataset name=”rss” type=”http” src=”http://blogger.ihardlyknower.org/index.xml” request=”true”
ontimeout=”Debug.write(this.getSrc() + ‘: timed out’)”
onerror=”Debug.write(this.getSrc() + ‘: error’)”
ondata=”Debug.write(this.getSrc() + ‘: data’)”
/>
<!– UI –>
<!– header –>
<view datapath=”rss:/rss/channel” bgcolor=”0xccffff”>
<text datapath=”title/text()” resize=”true”/>
<text datapath=”link/text()” resize=”true” />
<text datapath=”description/text()” resize=”true” />
<simplelayout axis=”y”/>
</view>
<window x=”40″ y=”50″ title=”rss feed from blogger.ihardlyknower.org”>
<!– LIST OF ITEMS –>
<view>
<view>
<view datapath=”rss:/rss/channel/item” onclick=”">
<view onmouseover=”this.setAttribute(’bgcolor’,0×336699);curr.datapath.setPointer(this.parent.datapath.p);Debug.write(curr.datapath);”
onmouseout=”this.setAttribute(’bgcolor’,0xffffff);” stretches=”width” width=”300″>
<text datapath=”title/text()” resize=”true”/>
</view>
</view>
<simplelayout axis=”y”/>
</view>
<!– CURRENT ITEM –>
<view id=”curr”>
<datapath/>
<text>link</text>
<text bgcolor=”0xcccccc” datapath=”link/text()” resize=”true” />
<text>description</text>
<text bgcolor=”0xcccccc” datapath=”description/text()” multiline=”true” width=”350″ resize=”true”/>
<simplelayout axis=”y” spacing=”4″/>
</view>
<simplelayout axis=”x” spacing=”10″/>
</view>
</window>
<simplelayout axis=”y” spacing=”10″/>
</canvas>