Categories > TinyButStrong general >

Sub-block using objects

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Col
Date: 2007-04-03
Time: 14:21

Sub-block using objects

Hi. I have an class where one of it's members is an array of itself:
class family {
public FamilyName; // Eg. Smith
public FirstNames = array(); // Eg. (John => 30, Jane => 28, Jack => 2)
public ExtendedFamily = array(); // Family class of cousins, etc

function getFamilyName() { return FamilyName; }
function getFirstNames() { ... }
function getExtendedFamily() { ... }

I'm trying to get the output to be something like this:
<h2>Smith</h2>
<table>
FirstName     Age
John            30
Jane            28
Jack              2
</table>

<h2>Smith Cousins</h2>
<table>
FirstName     Age
Joe              31
Jill               29
Jesica           3
</table>

. . . possibly more family tables . . .

I've tried all sorts of ways and searched through the forums but can't find anything similar. All help greatly appreciated.
By: Skrol29
Date: 2007-04-03
Time: 18:43

Re: Sub-block using objects

Hi,

If you can have several level of family sub items, then it's a hierarchical problem. They are related in this forum and in the Tips & Trics forum.

Other wise it is a simple display with sub-blocks.