macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

iPod Notes: Above and Beyond
Pages: 1, 2

Hacking Your History

Whenever you navigate through your iPod menus--regular menus as well as notes--the iPod maintains a history stack to keep track of your progress. Pressing the Menu button moves you back one step at a time through this stack. Because there are times that you might want to either skip one stage or reset the stack completely, Apple offers a couple of modifier tags for your anchor elements. Here you'll see what these tags are and why you might want to use them.



POPALL

Say that your user just completed a tour or a lesson. You want him or her to be able to jump right back to your main menu without either having to press Menu a few hundred times or leaving a history track through the already-completed segment. The POPALL tag empties the entire history stack, allowing you to return to the main menu without a history.

To use the tag, just add it to your anchor that links to the main page. The POPALL tag only links to the top of the notes hierarchy--to either the Notes folder itself or the main.linx (or index.linx) file. You cannot use it to link to an arbitrary file, whether or not it's in the home Notes folder.

<A HREF="/" POPALL>Finish this tour</A>
<A HREF="/main.linx" POPALL>Leave this lesson</A>

NOPUSH

Sometimes a menu or screen helps users choose how they want to explore parts of your tours or lessons, but they're not really helpful when you visit them a second time. For example, you might ask your user whether they want to listen to a presentation or read it, or you might choose whether to play the audio track with the background music or not. Similarly, introductory screens might not be as helpful the second, third, or fourth time you have to page through them when returning up the history stack. When you have a note that really only works in a forward direction, use the NOPUSH tag to link to it without letting it enter the history stack. Your user will see it only once, when navigating through it from higher to lower in the notes tree.

<A HREF="introscreen.txt" NOPUSH>Start Your Tour</A>
<A HREF="/chooseTextOrAudio.txt" NOPUSH>Read or Listen</A>

Using Language Encoding

Note files use Latin1 encoding by default unless the iPod language is set to Japanese, Korean or Chinese. (In which case, those languages are used to set the encoding.) You can tag note files to override the standard encoding as follows:

<?xml encoding="Korean" ?>

Valid encoding schemes include Latin1, MacRoman, MacJapanese, Traditional Chinese, Simplified Chinese, Korean, UTF8 Unicode, and UTF16 Unicode. Always place the encoding tag at the very top of a note, and only include one encoding per file. Please refer to Apple's documentation for further details about encoding schemes, character entities, URI encoding, and so on.

Debugging Your Notes

Set your iPod to report errors by adding <ERROR> to your notes. You'll see a list of any errors found while parsing that notes file, including badly formatted tags, dead links, and so forth. Figure 5 shows an error report for a note with a bad link.

Figure 5
Figure 5. The <ERRORS> tag generates an error report.

Make sure to remove all <ERROR> mentions after you finish debugging your note. Notes without any errors that are tagged with the error code will display as a simple blank screen. This can be both confusing and annoying when you've just forgotten to remove the tag.

Conclusions

It wouldn't be far off the mark to accuse Apple of over-engineering some of their products. When they deliver such delightful gems as iPod Notes, you really have to forgive them. It's a joy to discover these little-known but extremely useful extras and get the opportunity to explore and see how they can be used to get more value from your equipment.

This article and the previous one in this series have covered a fair majority of the features currently available in iPod Notes. You've read how to create notes and customize them, link them together, and produce menus that let users decide how they want to proceed. You've seen how to set up your iPod for "notes-only" museum mode and learned how to incorporate HTML text in your presentations, without having to remove tags by hand. You've also discovered how to control your history stack and debug your notes, and more.

I hope this article has inspired you to dig into iPod Notes and to try them out for yourself. To discover more about iPod Notes and how to develop your own notes presentations, please visit the following Apple links.

Erica Sadun has written, co-written, and contributed to almost two dozen books about technology, particularly in the areas of programming, digital video, and digital photography.


Return to the Mac DevCenter.