Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

View constant conversion errors aren't very clear #252

Closed
baroquebobcat opened this Issue · 4 comments

2 participants

@baroquebobcat

When you attempt to use a symbol for a view value, and there isn't a constant it maps to, you get an error with a message like cannot convert instance of class org.jruby.RubySymbol to int from the ruboto/widgets.rb file. It'd be nice if the error was more specific. eg :match_parent doesn't have a corresponding View constant, maybe directing people to the docs for ViewGroup.LayoutParams and Gravity as those are where the constants are converted from.

I ran into this because the default generated activity is not android-7 compatible as it uses :match_parent which was introduced in android-8.

@donv donv was assigned
@donv
Owner

Hi @baroquebobcat !

Sorry for the late response. I'll take a look at improving the error message to something more helpful.

Not so good that our activity template fails on android-7, but is android-7 an interesting target anymore?

@donv
Owner

Revisiting this now.

@donv donv referenced this issue from a commit
@donv donv * Issue #252 View constant conversion errors aren't very clear
* Added a hopefully better error message when a constant is not found.
69761d0
@donv
Owner

Hi @baroquebobcat !

Does this look better? The error message has been changes like you requested.

@donv donv closed this
@baroquebobcat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.