f2prateek/dart

Henson example

Closed this issue · 3 comments

I can't find out how to use henson, the readme is quite shallow, i got a activity annotated with Henson annotation, but the generated navigator don't have any extras options, and if i use InjectExtra on any field of the activity i got the following exception:

Error:(30, 8) error: @henson class MainActivty must not contain any @InjectExtra annotation

How can i correctly use henson with extras?

@henson must be used only for activities without any @InjectExtra
annotation. In that case, the DSL will only let you start the activity
without providing any parameter.

If you have fields using @InjectExtra, then you should not use @henson and
the DSL will let you set the value of the required and optional fields.

S.

2015-09-04 9:23 GMT-04:00 Yuri Hernani Heupa notifications@github.com:

I can't find out how to use henson, the readme is quite shallow, i got a
activity annotated with Henson annotation, but the generated navigator
don't have any extras options, and if i use InjectExtra on any field of the
activity i got the following exception:
Error:(30, 8) error: @henson https://github.com/Henson class
MainActivty must not contain any @InjectExtra annotation

How can i correctly use henson with extras?


Reply to this email directly or view it on GitHub
#69.

@stephanenicolas @f2prateek Does android studio automatically compile source code in the background? Because the only way i can get Henson to generate the $$IntentBuilder class is to explicitly run compile.

seato commented

@YuriHeupa Henson generates code (both to navigate to the activity and to add extras) by looking for @InjectExtra. If an activity doesn't have @InjectExtra then we need to help Henson by annotating the class with @Henson. Check out this issue for more info.