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 trial
Niranjan Deodhar
Courses Plus Student 1,941 PointsParse course - unclear code in SelectUsersActivity.java
The code that gets pasted in at 32 minutes and 3 seconds into the video is difficult to replicate manually since Row 59 -
UsersAdapter adapter = new UsersAdapter(SelectUsersActivity.this, ......
Falls off the right edge of the screen window and never gets reformatted. I tried to work back from the rest of the code in UserAdapters.java but could not do so. Please advise on what the complete line of code is meant to be. There are other areas where code that the instructor pastes into the project (and is not provided as a download) is unclear but in all other cases I was able to work from first principles and fix the gap. Apart from advising what the code is in this line, perhaps you may also want to always format the code that you paste in so that it is entirely visible in the screen, or perhaps even provide each of such pasted units of code as separate downloads.
5 Answers
Gloria Dwomoh
13,116 PointsWhat lesson are you mentioning and which video? Have you tried making the video full screen just so you can be able to see that part of the code better?
Niranjan Deodhar
Courses Plus Student 1,941 PointsI am doing the only course on Parse under the Android category ("using Parse back end..."), and there is only one video in it. And yes I did try the full screen mode but some code is still beyond the right edge of the screen. This happens at a few places but the one creating issues for me is just past the 32 minute mark.
Gloria Dwomoh
13,116 PointsOh okay. If this is really troubling, you can send an email at help@teamtreehouse.com with a link and a screenshot. Maybe that helps to get it fixed.
Niranjan Deodhar
Courses Plus Student 1,941 PointsOk thanks, I will do so. I have also dropped a line to the teacher of this course.
Appreciate you looking into it! Best regards
Gloria Dwomoh
13,116 PointsYou are welcome
Ben Jakuben
Treehouse TeacherSorry for the trouble here! I have my final code available as a link in the Teacher's Notes below the video. Here's the line in question:
UsersAdapter adapter = new UsersAdapter(SelectUsersActivity.this,
mUsers, new ArrayList<ParseObject>(results));
If you're interested after this, I work with Parse extensively in the Build a Self-Destructing Message App course.
Niranjan Deodhar
Courses Plus Student 1,941 PointsThanks Ben. On the line of code above, perhaps you meant to say "objects" at the very end there for instantiating a new array list, and not "results"? The latter gave an error, as it is not defined anywhere else, and the former made sense when I tried to think through what needs to happen. On your point about the next Parse course, I will certainly look into that. Reviewing the course summary though, I noticed that it may not cover "code on the cloud" aspects of Parse. I am keen to understand that next, now that the "data on the cloud" is getting clearer in my mind. Is there a course that will cover that? Best regards
Ben Jakuben
Treehouse TeacherWe don't currently have anything covering code in the cloud, but it is something we'd like to cover eventually with Parse in regards to running code like that for multiple platforms. It's good to know that you and other students would like to see something like that.
You have probably seen this, but the Parse docs on Cloud Code is the best place to start: https://parse.com/docs/cloud_code_guide
Ben Jakuben
Treehouse TeacherWe don't currently have anything covering code in the cloud, but it is something we'd like to cover eventually with Parse in regards to running code like that for multiple platforms. It's good to know that you and other students would like to see something like that.
You have probably seen this, but the Parse docs on Cloud Code is the best place to start: https://parse.com/docs/cloud_code_guide