• 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: EOAttribute.validateValue question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOAttribute.validateValue question


  • Subject: Re: EOAttribute.validateValue question
  • From: Kieran Kelleher <email@hidden>
  • Date: Wed, 11 Jul 2007 22:50:11 -0400

Chuck/Francis,

This is one approach I had been considering, so since you are both right, I'll now definitely choose that approach! .... I just needed to make sure I was not missing some more generic elegant way in eof.

I already have a DataMapping helper class that maps between target eo attribute keys and the csv field names. I'll upgrade that class to have a dictionary of optional ValueConverter classes for each destination key/keypath.

As always, thanks for the listening hears and constructive input,

Cheers, Kieran


On Jul 11, 2007, at 8:57 PM, Chuck Hill wrote:


A more generic and reusable solution would be to write CSVReader that takes a file reference, an array of key paths and an array of formatters to read CSV column strings, convert them if needed (with formatter) and set it (with key path and Key Value Coding). I've done this kind of thing in the past, and it's very handy. You can even create custom formatters to convert strings to special data (i.e. BooleanFormat, InetAddressFormat, etc.).

Interesting, that is precisely what I was about to suggest. I do the exact same thing. We must therefor be correct. Grin. It is definitely a more flexible solution and a better design for the problem at hand.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: EOAttribute.validateValue question
      • From: Chuck Hill <email@hidden>
References: 
 >EOAttribute.validateValue question (From: Kieran Kelleher <email@hidden>)
 >Re: EOAttribute.validateValue question (From: Francis Labrie <email@hidden>)
 >Re: EOAttribute.validateValue question (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: EOAttribute.validateValue question
  • Next by Date: Re: EOAttribute.validateValue question
  • Previous by thread: Re: EOAttribute.validateValue question
  • Next by thread: Re: EOAttribute.validateValue question
  • Index(es):
    • Date
    • Thread