cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Hawkins <kevin.hawkins.cord...@gmail.com>
Subject CDVViewController.commandDelegate
Date Wed, 20 Feb 2013 00:59:44 GMT
Hi all,

I'm looking through the CDVViewController implementation details on iOS,
and I'm not clear why its (public) commandDelegate property references the
concrete implementation class of the CDVCommandDelegate protocol
(CDVCommandDelegateImpl), as opposed to defining a more generic
protocol-based property.  From an object-oriented design standpoint, that's
something I didn't expect.  Is there a reason that this is different than
CDVPlugin's property definition?

It's not a super big deal, though it sets off something twitchy in my
brain. ;-)  What does need to change if it stays as-is, however, is that
CDVViewController.h should be #importing CDVCommandDelegateImpl.h, not
CDVCommandDelegate.h.  The way it is currently, the responsibility of the
former header's inclusion is being improperly passed on to the inheriting
view controller class.  And the latter header file's inclusion is
superfluous.

I figured I'd get thoughts before filing a bug one way or another.

Thanks,
Kevin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message