Adding --depth option to border command to recursively border subviews#126
Conversation
|
Interesting idea, thanks! We'll get this reviewed soon. |
There was a problem hiding this comment.
Did you want to have two separate asserts? One on the class, and another on depth?
There was a problem hiding this comment.
Can you please elaborate a bit, or give an example? Notice that I've changed the code a bit in a new commit, but assert still in place.
There was a problem hiding this comment.
This looks like it should be something more like:
assert true, "Recursive bordering is only supported for UIViews"
assert depth <= 0, "Recursive bordering requires a depth greater than 0"There was a problem hiding this comment.
There might be a misunderstanding here. The purpose of this assert is to make sure recursive bordering is not used for layers (or anything that's not a UIView or NSView). However regular bordering is still permitted for layers. So if you're in the code path that takes you to this else block, we should validate that depth is not provided to make sure recursive bordering won't happen.
There was a problem hiding this comment.
I see. It reads like it's assert bad values on the depth, yet giving an unrelated error message.
There was a problem hiding this comment.
I see. It reads like it asserts bad values on the depth, yet giving an unrelated error message.
There was a problem hiding this comment.
Ok, I'll add a comment that should make it clearer.
|
Thanks @eithanshavit 💚 |
|
Oops, wrong button. |
Adding --depth option to border command to recursively border subviews
No description provided.