• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running Totals
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running Totals


  • Subject: Re: Running Totals
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 30 Jul 2007 10:12:48 -0700

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:
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:
This email sent to email@hidden


References: 
 >Running Totals (From: Daniel Brajkovic <email@hidden>)

  • Prev by Date: Running Totals
  • Next by Date: Re: Running Totals
  • Previous by thread: Running Totals
  • Next by thread: Re: Running Totals
  • Index(es):
    • Date
    • Thread