Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMatthew Williams
3,103 PointsHow exactly does intent extra work?
In Stage 3 video 4 (Working with Intent Extras) Ben passed data to another class using an intent. The only problem for me is that when he passes the intent it's a totally new variable. If that's the case how will the name be remembered if it's a new variable outside the scope (This question will require you to watch the video)?
I thought that working with extras was more out of that scene from Star Wars VI when Han Solo and the gang have a passcode to go Jakuu but it's an 'older clearance, so it checks out'. So will our intents inside a scope work like that or will it not be remembered when that data is passed?
Batsirai Gurure
6,553 PointsBatsirai Gurure
6,553 PointsWhen getting data that has been put in the intent Ben uses the name of the variable that was passed into the intent. I'm not sure where exactly you are referring to where he uses a different variable name but I see him using the very same variable name.