WindowRefs, MenuRefs and HIViewRefs are all HIObjectRefs internally
and can be cast appropriately. In the early days of HIObjects each
sub type was initially type defined to an HIObjectRef. We noticed
there was an issue with C++ routines that differed in signature
only by the object type passed in (window, menu, view). In order to
preserve this behavior we had to type define them separately but
rest assured all windows, menus and views can be used in HIObject
APIs.
Okay, great!
In D, typedef's are not simple aliases (you can, in fact, use
"alias", if you like). Instead, typedef results in a "subtype", much
like a subclass. Subtypes are implicitly cast to the base type, but
an error is generated if you try to implicitly case the other way
(just like you'd find with C++ classes).
This makes it very natural to have all the various types be distinct
(for the purposes of function overloading), yet compatible.
I may find they all need to be aliased instead, but for now, I can
proceed.
Thanks!
--
Rick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden