• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Not as much as a problem, but rather a question in the HeadFirst Midi player code

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, at first I typed everything just as in the book and...it didn't work, giving me a message that the Track symbol wasn't found.


But much to my surprise, giving the full address of the Track object suddenly made everything work just fine!



So I'm left wondering why in hell it didn't work previously, why didn't the import line work as intended? Is there any explanation at all?
 
Marshal
Posts: 80487
455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you got a Track class of your own?
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your original version compiles fine for me. Most likely you changed something else, or weren't compiling that original code that you posted here.
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Have you got a Track class of your own?



That's what I thought too, but then it wouldn't give symbol not found for Track. I might complain about the method not being found, if his Track class doesn't have the same method.

Pedro Fonseca wrote:Ok, at first I typed everything just as in the book and...it didn't work, giving me a message that the Track symbol wasn't found.



@Pedro: Are you sure it was complaining that the class Track was not found? Not the method? Can you paste in the exact, complete error message?
 
Pedro Fonseca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good catch, thanks for the replies.

Indeed the problem was another Track.class in the same folder as the MiniMiniMusicApp, I have to be more cautious about this sort of thing in the future.
 
Campbell Ritchie
Marshal
Posts: 80487
455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pedro Fonseca wrote:Good catch, thanks for the replies. . . .

You’re welcome We have seen this sort of thing before.
reply
    Bookmark Topic Watch Topic
  • New Topic