We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
border = UI::View.new { background_color: :black, width: 50, height: 50, align_self: :center }.each do |k, v| border.send("#{k}=", v) end end view.add_child border view.update_layout
This however works:
border = UI::View.new { background_color: :black, width: 50, height: 50, align_self: :center }.each do |k, v| if v == :center border.send("#{k}=", :center) else border.send("#{k}=", v) end end end view.add_child border view.update_layout
The following properties would be impacted because of this (I think):
The text was updated successfully, but these errors were encountered:
I think there's probably a bug in:
#define define_property_sym(name, count) \ static VALUE node_##name##s[count] = { Qnil } ; \ static VALUE \ node_##name##_get(VALUE rcv, SEL sel) \ { \ int value = NODE(rcv)->node->style.name; \ if (value >= count) { \ rb_raise(rb_eArgError, "incorrect value for %s", #name); \ } \ return node_##name##s[value]; \ } \ static VALUE \ node_##name##_set(VALUE rcv, SEL sel, VALUE value) \ { \ struct ruby_css_node *node = NODE(rcv); \ for (int i = 0; i < count; i++) { \ if (node_##name##s[i] == value) { \ (*(int *)&node->node->style.name) = i; \ return value; \ } \ } \ rb_raise(rb_eArgError, "incorrect value for %s", #name); \ }
more exactly:
static VALUE \ node_##name##_set(VALUE rcv, SEL sel, VALUE value) \ { \ struct ruby_css_node *node = NODE(rcv); \ for (int i = 0; i < count; i++) { \ if (node_##name##s[i] == value) { \ (*(int *)&node->node->style.name) = i; \ return value; \ } \ } \ rb_raise(rb_eArgError, "incorrect value for %s", #name); \ }
Sorry, something went wrong.
No branches or pull requests
This however works:
The following properties would be impacted because of this (I think):
The text was updated successfully, but these errors were encountered: