On 26/10/2007, at 1:04 PM, Kevin Windham wrote:

On Oct 25, 2007, at 8:36 PM, Lachlan Deck wrote:
Ahh... perhaps I spoke too soon :-) Sounds like you're making it too hard anyway. If you have something like the following life will be easy...

ColsRepetition : WORepetition {
        list = recordsPerColumn;
        item = rowsForColumn;
        index = columnIndex;
}
RowsRepetition : WORepetition {
        list = rowsForColumn;
        item = rowItem;
        index = rowIndex;
}

WORepetition will increment columnIndex and rowIndex for you.

Are you saying I should be able to make the columns repetitions too?

That's an option. If not, then you can increment columnIndex like so:

private int colIndex = 0;
private int rowIndex = 0;

public int colIndex() { return this.colIndex; }
public int rowIndex() { return this.rowIndex; }
public void setRowIndex( int num )
{
        this.rowIndex = num;
        if ( rowIndex() == 0 )
                this.columnIndex = 0;
        else if ( rowIndex() % COLS_PER_ROW == 0 )
                this.columnIndex++;
}

public String cbName()
{
        return "r" + (rowIndex() + 1) + "c" + (colIndex() + 1);
}

What about the headers in the table? Actually I'm not sure this will work anyway since I also have some cells that are conditional and show other contents at times.

WOConditional's inside WORepetitions are allowed :-)

with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to