Closed colinta closed 12 years ago
I think apply
is a bad name, but it popped into my head first.
I'm playing with this in my assign branch branch.
Also added is a debug
feature. Just add debug: true
to your style, or to the view, and it will show you what and HOW it is assigning a property (whether it is using a setter, a property, or a "handler")
I guess this is my new feature branch. Another proposal:
subview(UIButton, :name)
subview(UIButton, :email)
Later, when I want to use those views
self.view[:name]
self.view[:email]
Access them by stylename! Since stylenames can be used on more than one view, there is also an all
method
self.view.all :email
I've mentioned this before, want to bring it up again.
Easiest example is
UIButton
. Settingtitle:
callssetTitle(value, forState: UIControlStateNormal)
. But what aboutsetImage(value, forState: UIControlStateNormal)
andsetImage(value, forState: UIControlStateHighlighted)
?I propose that we fix this by adding a way to attach procs to labels, and those become the new "setter" for that property.
This would have the side effect (benefit?) that you could create your own shorthands, and we wouldn't have to add them to core teacup (which would just continue to grow - :unamused:)