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: Running Totals



List: WORepetition {
	list = prices;
	item = aPrice;
}

BigDecimal runningTotal;

public BigDecimal runningTotal() {
	if (list.objectAtIndex(0) == aPrice) {
		runningTotal = aPrice;
	} else {
		runningTotal = runningTotal.add(aPrice);
	}

	return runningTotal;
}


Chuck

On Jul 30, 2007, at 9:59 AM, Daniel Brajkovic wrote:

Does anyone know of a way I can have a running total in WO repetition? Maybe in Javascript? Because I'd want it to be pretty dynamic. Change a column 2 value and all the column 3 values would change appropriately. For the life of me i just can't figure out a way.


For Example

Data1 $12.00
Data2 $14.00
Data3 $20.00

A new 3rd column would read:

Data1 $12.00 $12.00
Data2 $14.00 $26.00
Data3 $20.00 $46.00
_______________________________________________
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/chill% 40global-village.net


This email sent to email@hidden

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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: 
 >Running Totals (From: Daniel Brajkovic <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.