I’ve been developing php applications with Coda for the last week and have been absolutely loving it.

Coda has the ability to display online reference manuals as searchable "books" and comes loaded with The Web Programmer’s Desk Reference and the complete PHP Documentation. Users can add custom books and can even search the documentation from an editor window by command+double clicking highlighted text.

The feature is nice, but I felt as though it would be more useful to have locally stored books that could be referenced when offline.

It occurred to me that I was running Apache on my Mac and therefore could probably get Coda to display a locally hosted web site as a book, so I downloaded the full php documentation and placed the html files in a folder called “php” within the Sites folder in my home directory.

NOTE: If you don’t have a web host running locally, Coda books can also be made to use a URL that specifies a file (i.e. “file:///Users/username/Sites/php/index.html”) but there are disadvantages to this that I will cover in my next post.

After creating the custom book in Coda, specifying http://localhost/~username/php as the URL, everything worked as expected until I attempted to view the book when offline. In theory, Coda should still be able to open the book with no problem, but instead I was presented with a friendly message informing me that I was not connected to the internet.

Being a developer, I understand the importance of giving users clear and consistent error messages as opposed to displaying a blank screen, but I was disappointed that the overzealous warning prevented me from viewing local content.

I wrote an e-mail to Panic (I hadn’t yet discovered this mailing list), but before they could even write back I solved my own problem.

I discovered that I could get Coda to retry connecting to the local site by refreshing the book viewer window. This is accomplished by holding down the command key and pressing ‘r’ when presented with the “not connected” screen.

After banishing the warning, I was free to browse the locally hosted documentation with no problem.