Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

:constructor-args with primitive values #57

Open
roti opened this issue Nov 2, 2015 · 1 comment
Open

:constructor-args with primitive values #57

roti opened this issue Nov 2, 2015 · 1 comment

Comments

@roti
Copy link

roti commented Nov 2, 2015

I tried to use :constructor-args with a View class that has a constructor with two arguments, the second beeing a primitive int.

[:my-view {:constructor-args [256]}
results in following error
java.lang.NoSuchMethodException: <init> [class android.content.Context, class java.lang.Long]

[:my-view {:constructor-args [(int 256)]}
results in following error
java.lang.NoSuchMethodException: <init> [class android.content.Context, class java.lang.Integer]

I believe the only way to support this case, is to add some kind of special syntax or metadata to :constructor-args.

@alexander-yakushev
Copy link

I worked around this particular case by using :custom-constructor attribute.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants