• 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: Parameterized NSArray in 5.3.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parameterized NSArray in 5.3.3


  • Subject: Re: Parameterized NSArray in 5.3.3
  • From: Mike Schrag <email@hidden>
  • Date: Wed, 23 Jul 2008 17:19:22 -0400

I really like how explicit the the second one is ... You're going to get a dictionary back where the keys are the same type as the keypath you passed in and the values are the same type as the value key path you passed in ... Even without the added docs explaining what this does, you can almost guess by matching the types up with param types.
And 10 seconds later, totally hooked up by them:

private NSDictionary<DBHost, NSArray<DBDatabase>> _hostDatabases;
...
_hostDatabases = ERXArrayUtilities.arrayGroupedByToManyKeyPath(databases, DBDatabase.HOSTS, false);

Type mismatch: cannot convert from NSDictionary<DBDatabaseHost,NSArray<DBDatabase>> to NSDictionary<DBHost,NSArray<DBDatabase>>

Because I forgot I unflattened this relationship in the model, so now I get a compile error because it's not DBHosts coming back, it's the join table entity coming back.  One less server restart for me a couple minutes from now.  That's awesome.

ms
 _______________________________________________
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

References: 
 >Re: Parameterized NSArray in 5.3.3 (From: Rams <email@hidden>)
 >Re: Parameterized NSArray in 5.3.3 (From: Guido Neitzer <email@hidden>)
 >Re: Parameterized NSArray in 5.3.3 (From: Rams <email@hidden>)
 >Re: Parameterized NSArray in 5.3.3 (From: Guido Neitzer <email@hidden>)
 >Re: Parameterized NSArray in 5.3.3 (From: Rams <email@hidden>)
 >Re: Parameterized NSArray in 5.3.3 (From: Florijan Stamenkovic <email@hidden>)
 >Re: Parameterized NSArray in 5.3.3 (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Parameterized NSArray in 5.3.3
  • Next by Date: Re: No template found for component?!?
  • Previous by thread: Re: Parameterized NSArray in 5.3.3
  • Next by thread: Re: Parameterized NSArray in 5.3.3
  • Index(es):
    • Date
    • Thread