From: Panayotis K. <pan...@pa...> - 2010-03-06 12:54:22
|
I've seen that you have added a method named setBackgroundImage(UIImage backgroundImage) in core xmlvm library. And in order to properly handle it, you have used inheritance of UIView instead of categories. As far as I have seen, this is used under android to display an image underneath a widget. I believe this approach is bad and creates confusion. Although this will properly work for any widgets that actually inherit org_xmlvm_iphone_UIView, it breaks in all other cases. All native iPhone widgets which inherit directly from UIView and not from org_xmlvm_iphone_UIView, do not have this method (and do not need it actually). Still in the API it seems that everything supports it (although it doesn't). So it's very easy to break the code, for example by inherit any other UI object (except UIView) and use the setBackgroundImage method! If this is really needed under Android and there is no other way to do it, I'd suggest to create a new UIView component (something like UIViewWithImage or UIViewAndroid) which will have this functionality and let View object in Android library inherit from this. Thus it is clear which has which, and would not be possible to break the code any more. If you wish, I could make a patch like this and send it for approval. |