• 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: Opinion on ERXKey type parameterization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opinion on ERXKey type parameterization


  • Subject: Re: Opinion on ERXKey type parameterization
  • From: Paul Hoadley <email@hidden>
  • Date: Thu, 30 Mar 2017 10:10:41 +1030

On 29 Mar 2017, at 09:19, Paul Hoadley <email@hidden> wrote:

> Anyone else got any thoughts on all this?


I see it was discussed on the old Wonder list back in 2009. Dave Avendasora asked the exact question I asked:

> Since this is a to-many relationship shouldn't it be "ERXKey<NSArray<ScheduledRoutingRelationship>>"?


And Mike Schrag answered:

> no it just doesn't really work this way ... if it did this, it's easy to extend it to add the array, but it's impossible to deconstruct it to get the inner type.  there are methods to extend keys, etc with array variants for most operations, but you rarely actually want the type of the key to be NSArray<T>


Along with Samuel’s observations, seems like case closed. It does still seem to leave ERXGenericRecord.valueForKey(ERXKey<T> key) broken in the case of to-many relationship ERXKeys, though, doesn’t it? (Worse, it will break at runtime.)


--
Paul Hoadley
http://logicsquad.net/



 _______________________________________________
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: Opinion on ERXKey type parameterization
      • From: Samuel Pelletier <email@hidden>
References: 
 >Opinion on ERXKey type parameterization (From: Paul Hoadley <email@hidden>)
 >Re: Opinion on ERXKey type parameterization (From: Samuel Pelletier <email@hidden>)
 >Re: Opinion on ERXKey type parameterization (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: Opinion on ERXKey type parameterization
  • Next by Date: Re: Opinion on ERXKey type parameterization
  • Previous by thread: Re: Opinion on ERXKey type parameterization
  • Next by thread: Re: Opinion on ERXKey type parameterization
  • Index(es):
    • Date
    • Thread