|
|
|
|
Navigation
Services
What
are they
|
|
By:
Tim Mityok
of Public Access
Software
Copyright ©1998
This Article is an
introduction to what Navigation Services are. This is a
little techie, and more towards what programmers would
care about than lay-people, but does have some general
interest as well.
Normally, programmers must use
something called "Standard File Dialog" -- this is the
dialog that you get when you Open, Close or Save As,
using the file menu. Navigation Services is a new API
(Library) which replaces that Library with something far
better.
How it works
I must say, as both a Macintosh User and also a
Programmer, I have rarely seen anything come down from the
mighty Apple that has had nearly the impact that the new
Navigation Services API had on me.
Look at this image:
Just from a user's perspective everything about the new
way to Open and Save files within applications is absolutely
brilliant.
- The Navigation browser window is now resizable
(finally!) allowing you to stretch and distort to
accommodate long file names or to show more/fewer items
in the item list. (Note the resize area at the
bottom-right corner). This alone would be worth the
change to NavServices, but there's more.
- The browser window can also be moved around the
screen and does not suspend the rest of the computer
until a selection is made. (Normally the Standard File
dialog is completely modal -- but Nav Services dialog
allows other things to happen).
- Along the upper left portion of the browser window is
a Location popup menu showing you the current location
with a volume. This is similar to the location popup menu
of traditional Open windows.
- The list of files, folders and other objects mirrors
the new Grayscale Appearance of Mac OS 8 and includes
shading as seen in the Mac OS 8 Finder's own list
views.
- There are two sort "buttons", Name and Date Modified.
These can be selected to "sort" items accordingly. The
Date Modified field shows one of three different date
formats depending on how much horizontal space is
available. The wider the window, the more information is
shown.
- The sort order widget, the small "arrow" in the upper
right corner of list view windows, is also present as in
the Finder of Mac OS 8.1 and beyond. This allows users to
change to either ascending or descending order (normal or
reverse order).
- The most welcomed addition has to be the inclusion of
"disclosure" triangles which allow you to see inside
folders or volumes within the context of the entire
hierarchy. (So you can display information in multiple
directories at the same time).
- Along the upper right corner is a set of three
icon-buttons:
- The first icon-button, called Shortcuts, contains
a list of mounted volumes including local and remote
hard disks and any removable media. You can even
select an "Eject" function for the removable items
from this one menu.
- The second icon-button, called Favorites, contains
a list of bookmarks to specific folders, volumes or
other media. The contents of the Favorites menu is
divided into three sections. The first section
contains commands for "Add to Favorites..." and
"Remove from Favorites...", all book marked files are
in the second section and then book marked folders and
volumes in the last section.
- The third icon-button, called Recent, contains a
list of recently selected objects. Recent files are
listed in one section and all recent folder and/or
volumes are listed in a second section. Recent files
are only shown in Open browser windows and
files/volumes are shown in Save browser windows. (The
number of recent items will not exceed the settings in
the Apple Menu Options Control Panel.)
- All options and settings are application-specific so
you can position and resize a Navigation window in
Microsoft Word to show long file names with 10 items and
in Photoshop you can have a narrower window with 15 items
listed. Also, the Navigation window position is retained
for each individual application as well.
- When you are presented with a browser window you are
automatically taken the the last place you were right
down to the object selected, this is the default
location.
- When you move up one level the location you came from
is automatically selected in the list (showing you where
you just came from), very cool.
- An additional option is to show a Preview of various
files. So if you have QuickTime installed and the file
supports Previews. The Preview area is now located to the
right of the file list and can be opened or closed using
a single button labeled "Show Preview" or "Hide Preview"
respectively. The browser window does not adjust its
size, instead the file list area compresses to
accommodate the Preview section.
- There are new ways to work with the files and folders
as well including numerous keyboard shortcuts for
selecting items, navigating the windows and shortcuts for
activating various buttons within the window.
The commands are simply too numerous to list here. There
is definitely a lot of thought behind all this new System
functionality. The point is that these are long overdue, and
well needed improvements to the Mac Interface. (Also see
ScreenShot #2, and
ScreenShot #3)
Not only is all this stuff cool for user, but it is great
for programmers as well.
Programming with Navigation Services
For Programmers Navigation Services provide all of the
functionality of Standard File Services and then some.
- Since so much functionality is already built into the
Open and Save dialogs you merely have to ask to open the
appropriate window. No more need to for custom-made Open
or Save dialog windows!
- There is, of course, support for customizing the look
of the browser window including showing the preview
option and the ability to provide file translation
capabilities. Navigation services will even automatically
convert a document if it is not of a type supported by
your application if so configured. The automatic file
translation can be turned on or off independently of the
file translation options menu added to a browser window.
This allows your application to translate a document
itself.
- Navigation Services provides the ability to choose
File Objects which can be files, folders only or volumes
only. All browser windows are pre-made, you simply make
the appropriate call and respond accordingly.
- You can add your own controls to any browser window,
and if you really need to, you can provide custom
features specific to your application.
As it stands Navigation Services should fill the needs of
the majority of applications present and future.
Conclusion
Navigation Services simply blows away the neglected
Standard File which is used everywhere on the Mac OS and is
immensely outdated and severely limiting for users. With the
new browser window shortcuts and especially the new
Favorites list you can quickly navigate to where you want to
be and get back to your work. The most annoying aspect of
the tradition Open windows in my opinion, the inability to
keep track of where you were, has been eliminated
altogether.
Many of the changes to Open and Save windows in
Navigation Services will be a welcomed relief to those who
must be Opening and Saving files repeatedly while they work.
For Programmers, they now have a much easier to implement
and more powerful system to provide file manipulation
services in their application that is also extensible to
match their needs. So Navigation Services is not only an
improvement for users, but programmers as well. Less work,
more functionality, less support calls, better user
experience.
Navigation Services provides a tremendous amount of
functionality in a System service that is easy to implement
in existing applications as well as new ones. It has been
shipping for quite a while, and is OS version independent
(it is a library that can be dropped in to work on older
version of the System as well as future versions).
So while it is unfortunate that Navigation Services are
too "geeky" (or technical) for Apple to market effectively,
it will definitely be a big "add" as more and more
Applications take advantage of it.
Technical Information
Navigation Services exists as a Shared Library on the Mac
OS. On 680x0 systems it requires the CFM-68k enabler,
however non CFM-68k applications can use Navigation
Services. Navigation Services requires System 7.5.5 or newer
and Appearance 1.0.1. On 680x0 systems you must use a newer
OpenTransportLib.68k file that is included in the Navigation
Services SDK.
|