• 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 + table cell values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data + table cell values


  • Subject: Re: Core Data + table cell values
  • From: Diederik Hoogenboom <email@hidden>
  • Date: Sat, 18 Aug 2007 10:38:03 +0200

Hi Alex,

For the concatenation of name and ipAddress it would be sufficient to create a subclass of NSManagedObject called Server link this class to your Server entitity on your data model and create a getter to return the formatted string.

As for the formatting of the bitDepth attribute, I would create a NSValueTransformer and link this to your binding of your table cell value.


Diederik

--
Diederik Hoogenboom
Obvious Matter - DiskLibrary for Mac
http://www.obviousmatter.com



On 18-aug-2007, at 9:29, Alex Reynolds wrote:

Let's say I have a Core Data entity called "Server" with the attributes "name" and "ipAddress".

I also have a Core Data entity called "Display" with an attribute for "bitDepth" (and a few others of no consequence).

Is there a way to format or use a pattern to merge two attributes' values into one table cell value?

For example, if I have a data entry

name: "localhost"
ipAddress: "127.0.0.1"

How would I go about placing "name (ipAddress)" into the cell value, e.g. "localhost (127.0.0.1)"?

Also, is there a way to do a conditional in the Interface Builder, such that, for three bit depths "32", "16" and "8", I could replace these terms with the values "millions", "thousands", and "256"?

Do I need to subclass my Server and Display entities and set up "getter" methods that offer formatted data, to do this sort of thing?

Thanks for any advice,

Regards,
Alex

----------------------------------------------------------------------
Alex Reynolds, M. Biot.
217 Leidy Building / 6013
Department of Biology
University of Pennsylvania
Philadelphia, PA 19104

V: +1 215 573.2818
F: +1 215 898.8780
E: mailto:email@hidden
W: http://www.bio.upenn.edu/computing/

_______________________________________________

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:
40obviousmatter.com


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 + table cell values (From: Alex Reynolds <email@hidden>)

  • Prev by Date: Re: How to use Automator workflows in a Cocoa application?
  • Next by Date: Another Core Data + table view question
  • Previous by thread: Core Data + table cell values
  • Next by thread: How to print with a different NSPrintingOrientation for each page?
  • Index(es):
    • Date
    • Thread