Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

getURLField() method missing in listing 5.16 #1

Closed
matthiaszimmermann opened this Issue Jul 8, 2013 · 5 comments

Comments

Projects
None yet
4 participants
Contributor

matthiaszimmermann commented Jul 8, 2013

on page 99 i interpreted the reference to listing 5.16 as an invitation to just copy paste that code into the source file instead of adding the URLBox and URLField manually using the SDK. This leads to an error in listing 5.17 because the getURLField() method is missing. This was not a grave problem for me, but I can imagine that this might be a stumbling block for a scout beginner.

observed in release 3.9.0.0
https://github.com/BSI-Business-Systems-Integration-AG/scoutbook/releases/v3.9.0.0

issue copied from scout forum:
http://www.eclipse.org/forums/index.php/t/489987/

@matthiaszimmermann matthiaszimmermann pushed a commit that referenced this issue Jul 8, 2013

Matthias Zimmermann issues #1 and #2 1a3b675
Contributor

matthiaszimmermann commented Jul 8, 2013

Urs, can you verify please?

UrsBeeli commented Jul 9, 2013

I noticed you changed the caption for listing 5.16 which makes it clear that his is only an excerpt. I don't know if there are any more changes concerning this topic (didn't find any at a quick glance) but I think this is sufficient.

Contributor

matthiaszimmermann commented Jul 9, 2013

Tx issue closed

For what it's worth, I stumbled at the same point. Although the text indicates the listing is just an excerpt, the statement "we omit the description of the creation of the URL editor form’s content and provide the resulting Java code instead" seems to encourage the reader to copy and paste the incomplete code, rather than creating the field via the SDK. This seems particularly relevant given earlier comments in the book about how either method (i.e. writing Java code, or using the SDK) should produce the same result.

I also discovered upon running the program that there was no OK or Cancel buttons on this form, and there's no mention of adding them given in the book.

Finally, I'd also suggest adding the code necessary to populate the existing URL value on the PictureURLForm. While I'm no expert, it seems to me that adding the following code to the execAction method of the EditURLMenu class seems valid.

PictureURLForm form = new PictureURLForm(); // existing code
form.getURLField().setValue(getPictureUrlField().getValue()); // additional code
form.startModify(); // existing code

I recommend either expanding the listing to cover this additional code, or at least mentioning that the user should use the SDK to complete those tasks, rather than attempting to copy and paste the listing.

Contributor

kensanata commented Dec 11, 2013

Thanks for the feedback, @pmackinlay. How do you feel about contributing a patch to the .tex source files? I'm trying to motivate people to contribute directly. :)
Also – and this one is important to my workflow – do you want to reopen this issue? If it's not open, I'll forget it as soon as the email disappears from my INBOX. It has already happened once as you can tell by the delayed response. I just look at the open issues.
Anyway, in short: reopen this issue if you'd like me to look at it again when I'm back in the office. Even cooler: reopen this issue and leave a comment saying that you'll contribute a patch. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment