The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

oldfartdeveloper (18) [Avatar] Offline
#1
In Listing 3.7, it doesn't seem as though the following two functions are used anywhere:

  • photoArray

  • getPhotoUrl


  • I find no reference to them, but my code still seems to work completely.

    On a different note, thank you for doing an excellent job on sprinkling new 0.18 features in and explaining them; really helps as I struggle to acquire the 0.18 syntax changes.
    rtfeldman (60) [Avatar] Offline
    #2
    Thank you for the kind words! smilie

    If you take a look at the `SelectByIndex` branch of the `update` function in Listing 3.7, it's calling `getPhotoUrl`.

    `photoArray` is a bit trickier - it's used in `randomPhotoPicker`, which in turn is used in the `SurpriseMe` branch of `update`.

    Hope that helps!
    Richard Haven (8) [Avatar] Offline
    #3
    perhaps putting a note next to each name at the end pointing out where it's used would help

    Cheers