PDA

View Full Version : Simple binding questions




Monaj
Nov 26, 2010, 06:06 AM
Hi all,

I am trying a simple application which is like this-

View:

1. A table view showing count of entity 1 in first column and count of entity 2 in second column. Here each row specifies count of different entities at a particular date.

2. A text field showing- total count of entity 1 multiplied by 35.

3. A text field showing- sum of count of entities in both the columns.

eg.

(entity1) (entity2)

<2> <3>

<4> <2>

<5> <7>

requirement 1: text field specified in pt. 2 should show - 385 ie. (11 * 35)

requirement 2: text field specified in pt. 3 should show - 23 ie. (11 + 12)

Model:

An object with two properties:

int entity1Count

int entity2Count

I am using an array controller object to show data in table view.

My question is -

Can I implement my requirements via bindings in IB? If yes then how?

Thanks,

Monaj



Monaj
Nov 27, 2010, 05:49 AM
Hi all,

I am able to implement requirement 1, via bindings in IB using NSNumberFormatter and its multiplier property :)

but I am still unable to implement requirement 2 :(

Any suggestion ?

Thanks,

Monaj