• 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
Array controllers in code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Array controllers in code?


  • Subject: Array controllers in code?
  • From: Amy Gibbs <email@hidden>
  • Date: Thu, 22 Jul 2010 10:05:43 +0100

Hi,

Apologies in advance for being stupid!

I've got an app I'm trying to create, using Core Data, I created the data model, and Dragged some of the interface into place in the nib.

I've almost got the bindings sorted so it's got Array controllers for all the entities, and it's pretty much displaying everything correctly.

Some things I want to do though need to be actually coded, but how do I reference the Arrays/Array controllers in the code? Do I need to declare them? They aren't at the moment that I can see, but somehow it's using them. All the tutorials I find either cover everything in code (kind of Pre-Core Data) or do everything with bindings.

For example, I've got an Entity called Product, with 3 properties, UOMcost, purchaseUOM and cost. I want cost to = UOMcost/purchaseUOM. I can't set this up in the datamodel, so I need to calculate it. In my interface I've got a table with all the products, and text boxes that show the data for the selected product ( master/details display). I've added a 'calculate' button, so now I just need to take the 2 properties from the selected product, do the maths, and set the cost property with the result.

If anyone could show me how to do this I'd be extremely grateful, I'm only trying to do this for my own use, not to sell apps or anything, and it would really help click some cocoa/Obj-C things into place for me I think.

Thank You,
_______________________________________________

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


  • Follow-Ups:
    • Re: Array controllers in code?
      • From: mmalc Crawford <email@hidden>
    • Re: Array controllers in code?
      • From: Jack Nutting <email@hidden>
    • Re: Array controllers in code?
      • From: email@hidden (Laurent Demaret)
  • Prev by Date: Re: Knowing how a Text Editing Session ended
  • Next by Date: Re: cocoa app is cancelling shutdown
  • Previous by thread: Saving numbered list as web archive causes indenting problem
  • Next by thread: Re: Array controllers in code?
  • Index(es):
    • Date
    • Thread