To offer improvement on my own suggestion - further to Troy's post, my
choice of isKindOfClass: was a poor pick as example of an introspection
method - respondsToSelector: would be more useful as it will correctly
return YES for an object pretending to be an array where isKindOfClass: will
not.

On 1 July 2010 21:16, Christopher Wright <christopher_wri...@apple.com>wrote:

> > im making a custom plugin that has a structure input port (array). when i
> send it an array of dictionaries, the dictionaries become arrays. Why is
> that?
>
> Just to entertain this idea some more, what happens if the user of said
> plugin were to attach a structure of numbers to this input port?  That would
> give you an array of NSNumbers (which also won't respond to -objectForKey:).
>  Similar outcome happens for an array of strings, or colors, or pretty much
> anything.
>
> The "array-ification" of the dictionaries is an unfortunate implementation
> detail (being tracked by a radar, don't worry), but even if that's resolved
> I think Tom's suggestion to check types first will likely be essential to
> have reliable operation under general QC circumstances.  Thoughts on that
> aspect?
>
> --
> Christopher Wright
> christopher_wri...@apple.com
>
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
>
> http://lists.apple.com/mailman/options/quartzcomposer-dev/bangnoise%40gmail.com
>
> This email sent to bangno...@gmail.com
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to