Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strangeness afoot



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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Strangeness afoot (From: Kevin Windham <email@hidden>)
 >Re: Strangeness afoot (From: Lachlan Deck <email@hidden>)
 >Re: Strangeness afoot (From: Lachlan Deck <email@hidden>)
 >Re: Strangeness afoot (From: Kevin Windham <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.