rubymotion/teacup — pull request #41 by colinta (2012-07-14 15:15:08+00:00)
Title: Fixes

Small fix: `respond_to?` is the wrong method sometimes - prototyped methods don't seem to get picked up. `respondsToSelector:` returns the correct value.

Bigger bug: fixed how styles get overridden. Here was the situation:

```ruby
style UIButton,
portrait: {
width: 200
}

style :my_button,
width: 150
```

`:my_button` was getting set to `width: 200`, because `portrait` was overriding the "default". The fix was to move the orientation code into `clean_properties`, and call `clean_properties` before merging the classes (before `self.class.ancestors.each...`). It's a big gnarly diff, but check out the tests - they kind of make it clear what is fixed (and the tests *pass*, so **there** :wink:)