Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Monaj

macrumors regular
Original poster
May 24, 2009
193
0
Hi All,

I am trying a sample application, which enlists some entities to purchase and their respective cost.

In data model I created two entities:

1. Daily Transaction (Attribute: cost, Relationship: relatedEntity)
2. Entity (Attribute: name, Relationship: dailyTransactions)

Controls used in XIBs and their bindings:

I. ArrayControllers -

a. DailyTransactions, corresponding to **Daily Transaction** entity.

b. Entities, corresponding to **Entity** entity


II. A table -

Col 1: EntityName - NSComboBoxCell (value : bind to -> dailyTransactions, controller key -> arrangedObjects, model key path -> relatedEntity.name)

Col 2: EntityCost - NSTextFieldCell with NSNumberFormatter (value : bind to -> dailyTransactions, controller key -> arrangedObjects, model key path -> cost)

» NSComboBoxCell in EntityName (content values : bind to -> Entities, controller key -> arrangedObjects, model key path -> name)

Problem is -

When I am selecting a value in dropdown list of combobox cell, it is changing the value of previously selected value to newly selected value, as shown in below figure(s) -

Original list:

unique%20data.png


Changed list:

redundant%20data.png


Can anyone suggest me how to resolve it?

Thanks,

Monaj
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.