• 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: Core Data Bindings. weird behavior.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data Bindings. weird behavior.


  • Subject: Re: Core Data Bindings. weird behavior.
  • From: Sandro Noel <email@hidden>
  • Date: Wed, 13 Aug 2008 18:31:33 -0400

ha!
what i found out is that since i'm using the transactionType.name to display the value of the relationship
instead of updating the relationship to that row, the bindings update the name of the transactionType item
in the database, so all the rows using that use that item also get renamed, well because the reference object got renamed.


how do i get it to update the relationship instead of just updating the display name.




On 13-Aug-08, at 5:24 PM, Quincey Morris wrote:

On Aug 12, 2008, at 20:10, Sandro Noel wrote:

I have these entities, with these attributes and relationships.

entity: Transactions
attributes: field1, field2
relationship : transactionType

entity: TransactionTypes
attributes: field1, field2
relationship : transaction

In interface builder I have two array controller bound to these entities,
the tableview columns are bound to the field1 and field2 and transactionType


the transaction type is bound to a column in the table view with the keypath, transactionType.field1
witch displays the name of the transaction type properly.
if i set it to just transactionType, i get a crash, i guess because it's a relationship...


now, in the transactionType column the cell is a combo box, bound to transactionTypes array. witch gives me
a drop down list of all the transaction Types available.


the problem i get is that if i select a value from that list,
all the transactions that were of the same type of the one i am trying ti change
get changed as well, not just the one row I am trying to change.


So let's say i have 15 transactions of type DEBIT and i change the first one ot CREDIT, all the 14 other ones get changed along with it....

When the column's cell is a combo box cell, the column has 3 bindings instead of 1 (content, contentValues and value). What are your bindings set to?. It's not going to work properly unless you you set all 3 bindings properly.


Also, make sure you set the bindings of the column, not the cell.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Core Data Bindings. weird behavior. (From: Sandro Noel <email@hidden>)
 >Re: Core Data Bindings. weird behavior. (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Core Data Bindings. weird behavior.
  • Next by Date: Re: Core Data Bindings. weird behavior.
  • Previous by thread: Re: Core Data Bindings. weird behavior.
  • Next by thread: NSUserDefaultsController with defaults for another app
  • Index(es):
    • Date
    • Thread