2 Apr 2006 08:59
Recursive classes
Hi, I'm trying to do something like:
<class name="headerview">
<simplelayout axis="y" />
<view>
<resizelayout axis="x" />
<header datapath="title" options='releasetolayout' />
</view>
<headerview datapath="subheader" />
</class>
Where the kind of data it's reading from is:
<data>
<title>Top title</title>
<subheader>
<title>Second title 1</title>
<title>Second title 2</title>
<subheader>
<title>Third title 1</title>
<title>Third title 2</title>
<title>Third title 3</title>
</subheader>
</subheader>
</data>
However, the call to <headerview> inside of the class definition seems to
cause an infinite loop, and nothing shows up. What can I do about this? I
thought that the fact that the replication would mean that no headerview
instances are produced would stop the recursion, however I guess it's trying
to process it when it loads, rather than when it runs.
(Continue reading)
RSS Feed