Re: Core Data + table cell values
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