WWDC1997 Session 103

Transcript

Kind: captions
Language: en
welcome to session 103 I'm Gordon garbed
user experience evangelist first we're
going to give you an overview of the
user experience roadmap on Mac OS in the
second part of this session you'll learn
about contextual manager contextual menu
manager plugins and Apple data detectors
which are a contextual menu manager
plugin so please welcome the Mac OS user
experience technical lead Arnold Gordo
[Applause]
my note on my power book my prayer book
is waking up there you go so when the
Christopher Columbus decided to go west
and see what was out there the state of
the art in the terms of maps that were
available was the map of the world that
Romero did in the 1459 and on this
method was very interesting map because
first of all tremor was pretty certain
about what he was describing he thought
it you know we knew the world as it was
and on his map you can see that first of
all the oceans cover only 10% of the of
the earth which we later learn is not
quite accurate and of course the
Americas wasn't on his word on his map
either because you know we didn't know
about them but it was pretty sure that
it was a projector instead of the world
so I want to talk to you about the
roadmap of what we want to do in the in
terms of user experience and much like
Romero
you know I unlike him whether I know
that what I'm going to tell you is not
necessary 100 percent agree that things
can change and you know that we don't
let you know everything that's going to
happen in our industry which is pretty
dynamic and difficult to predict what's
going to happen in 12 years but I'm
going to try to give you an idea of
where we've been and where we going a
lot of things that we've been talking
about for the past years at the
different types of leader businesses I
actually have been following this road
map and as you can see we've been pretty
consistent in terms of what we want you
to do in terms of user experience of
course few things that change in terms
of fulfilling with us but you know we
consider that to be what's going on
endure and we care less about that it
does not affect really the direction as
follow for the user experience so those
are the categories that that we're going
to be looking at system management
desktop management information access
customization assistance and help if you
were there at produce WWC
you remember this thing that's basically
what what we talked about before and
again you know we're going to go over
along the same directions
one thing that importance you said
before I go into more detail better what
we've been doing with system76 with the
Mac website and with video systems one
thing that's really important important
that has to do with us obviously import
it's part of the user experience it's
not only new to have nice features and
have a finder that's easy to use and so
on of course that's very important but
even more important is to have a system
that's actually reliable you know if
your machine crash crashes every five
minutes well that's not a very good user
experience if your machine is not
responsive if it's too slow that's not a
very good user experience either so
performance and stability are two very
key components of what the delivering
the total user experience once you have
that then you can start working on
delivering some more advanced features
and that's what I'm going to be talking
about now so you can see on this slide
in green the different things that we've
been doing with harmony we've introduced
a new expansion manager which is helping
a lot managing different extensions and
control panels and so on as well as a
new installer those were the kind of the
two main features and 76 in addition to
the other ones related to performance
and stability improvements obviously
there is also Apple information access
tool to the SDK that's available to
seedings and some of you have have been
using it and of course I will guide
which we delivered with the 2007 five
now in Temple we'll be introducing some
more features we'll have new versions of
the upgrader we can make some
improvements to your hard disk layout we
have some set of assistance I'm going to
talk about this and the normal defender
in a while
a lot of things in the area of disturb
management obviously some things in
information access contextual menus and
ADT which we're going to talk about some
more in this session and it
minutes appearance we do at a session
that talked about the different thing
that we are doing in terms of including
the toolbox and improving the overall
appearance of Mac OS and it's different
and help and again the worst things that
we've been doing that you'll be able to
see in Mac OS 8 and those are some of
the future directions I'm not going to
talk a lot about this because again you
know things change and it's difficult to
predict exactly what we'll be doing but
I'd like to give you an idea of the
things that we are interested in and I'm
going to go talk about this some more
when I will go on the next slide first
of all in the area of system management
at the Commerce session we talked about
the CGI trademark resource there's
another resource also that's important
you know that is the HIV are minus 56 96
resource CGI trademark was introduced in
2006 the HF grv sauce was introduced
with 77 actually but not all
applications take advantage of it and we
believe that it's something that's very
simple to do it's just a resource to add
to your application or to your to the
extensions that you create and so on but
it's very useful because you can provide
some information to end-users about you
know what is this thing in my extension
folder why would I want that what does
it do CGI trademark is more useful for
the extension manager and provide more
length information and you can find
information about how to do that in your
application in the tech node that's
using the newest numbering scheme is TN
109 one and you can find that on the dev
world that website is the it's called
the extension major tech node in case it
gets me numbered between now and the
time we look at it we've made some
change changes to the how display ad you
know very uh the more we add things that
not necessarily with a very well-defined
plan things start to get a little
complicated and messy so we try to clean
up things for in order to do that in Mac
OS 8 we're going to introduce a number
of new folders seek a Haunter
this the chorus searchin changes the
session will have new point photos
selectors the tempo tech note will
detail that will explain what those
folders are for what the selectors are
for how can you how you can use that to
help with the setup of the system as
well we'll have the to assistant and the
tempo Mac OS 8 one that will help up
help with setting up your system in
general setting up things like you know
date and time and wise your name and so
on
and another one that will help customers
get on the internet set up your IP
configurations
find a nice P if you need to find one
and so on
this is something that also there is an
opportunity for you to take advantage of
that in your applications and we do have
an article in developed number 27 that
details how you can do that it gives
some sample that that had to do that and
that explains as well the user interface
guidelines that you can follow to make
them work well in the area of disturb
management obviously a lot of changes
with Mac OS 8 you've seen some of the
demos this morning and this afternoon a
lot of things have changed there are
some important things also that will be
detailed in the tempo release note when
we put it out about some new Apple
events that your application will be
sent we've made some changes also in the
way drag and drop works so that you can
drag and drop information between your
applications and the finder more easily
and more logically than it did it
doesn't it does right now
and in the future there are some other
advances that we want to do obviously we
did not have time to do everything we
wanted in the Mac website for example
Mike website still uses the find file
2007 six there are some improvements
that would like to make in this area
there are some improvement that we like
to make as well in the area of
integration of the Internet to the
desktop there are a lot of simple things
that we could do that we think would
have a lot of values and we're looking
into into those and hopefully we'll be
able to deliver them in soon
in a system in the system release so we
think there is still a lot of room for
improvement and I'm sure that once
you'll be having an opportunity to play
with the finder 8.0 you'll also give us
some feedback about what kind of things
you'd like to see in it it's by no way a
finished worker still a lot of things to
do
in the area of information access also
we've talked about this for a while and
there's a number of things that we've
done Apple information access toolkit
which we use the codename v-twin for it
before it is now available as the NHD
k4u developers we want to take advantage
of it we have a session at the WGC
session 104 that will discuss how to use
the api's and also how you can get in
touch so that you can get seated with it
and use it in your product so if you're
interested in it you're welcome to
attend this session contextual menus and
Apple data detectors in section 102 we
talked about how your applications could
use contextual menus in this session
we're going to talk about how you can
write connect for many plugins and
expand the capabilities of the finder
for example or external capabilities of
other applications that will use
contextual menus as well and we'll also
be talking about Apple data detectors
which are a great way it's a kind of
connection plug-in it's a great way to
extend the capability of contextual
menus by doing very powerful text
searches very easily for you and they
will explain to you extend that unit in
a while let me go back to the slide
another thing that I didn't mention
there in that we're looking in terms of
things that we want to do in the future
we want to provide access to the content
of documents when you do search it and
so on and that's something that we'll be
looking at incorporating in the finder
in the future so the old users can take
advantage of it another thing that we'll
be looking at as well is navigation
services which we talked about at
previous conferences it's not part of
micro site yet but this is still
something that we're working on that
we'd like to deliver eventually we don't
have a specific plans to tell you right
now but I
it's important that you should know that
it's one of the direction that we're
looking at appearance one oh we are
talking about we're totally in the
session 102
we're just before here that will be
repeated on Friday as well if you can
understand it the in terms of the
changes that we're doing both the
end-user level the appearance is visual
visibly different but also at the
toolbox level and again there are many
more things that we want to do some
improvements to the toolbox to make it
easier for you to use we don't really
want to make huge changes that you know
will require you to record your entire
application that's not what we're trying
to do on Mac OS we want to do small
improvements that can have the most
value for you and another thing that
they will be looking at obviously is a
team switching which will allow users to
select different kind of clearances and
again that's something that will be
coming out later in the area of
assistance the Apple guide obviously has
been here for for a long time we have
mentioned before we also introducing
assistance in in tempo and if you have
been using Apple yet is something
important for you to know is that we
have a much improved tool that you're
going to be able to use it's called the
Apple guide visual authoring authoring
tool also known as AG that it will be
compatible with editing source files so
you don't have to start from scratch you
can import existing source files and
it's going to generate output that's
compatible with with the so side that
you may have today the compiler speed
has been much improved so the process of
compiling an entire database is much
more much more it's much better than it
used to be and there are a number of
features also that make localization
easier again that's that have to do with
the process of repetitively making
changes for the days as the original
version changes letting the localized
versions tend staying but there are a
lot of features and printer views that
will make that easier it's going to be a
series starting in June 97 and you'll be
able to have a look at it and use it
it's a much more graphical tool instead
of having lines of code as you
and see maybe I'm from on the on the
slide here what you have on the
left-hand side is kind of you know you
had with the existing tools you have to
use a biblical programming language to
describe what you want to do with AG
that you'll be able to have something
that's much more graphical here as you
can see your representation of the
access window and you can type in
directly the different topic areas and
so on so much more direct manipulation
so it's a very nice tool so I just
wanted to give you an idea of the kind
of directions that we're going towards
we'll have also a feedback form for the
fine-grained user experience
later this week and I invite you to come
here that gravities forum and ask us the
questions that you may have and the
directions that you would like us to go
towards and at this point I'd like to
ask well just in time I'd like to have
unfinished guys felt guys follow time to
talk about contextual menu plugins thank
you very much I could have introduced
myself if you want to be too but all
right so for those of you who are here
at the previous session about appearance
you learned that you could add
contextual menus to your applications um
this is all well and good but you may
have some other ideas of items that
could be added to other applications
contextual menus so to that end we allow
plug-ins to the contextual menu manager
what these plugins are are PowerPC only
standalone code modules based on Psalm
that allow your plugin to modify other
applications contextual menus by looking
at what was clicked on in the given
application so in the graphic you can
see that the application commands have
to do with text the contextual menu
manager also adds some help commands at
the top and plugins have added several
other commands since they can sense that
the user clicked on text
now I'd like to give you a demo of what
life is like with and without contextual
many plugins on this machine we have a
stock tempo with no contextual ranges so
if I bring up a contextual menu on say a
folder in the finder I have all the
finders standard commands that should be
on a contextual menu now if I move to
this other machine and second as I need
the second machine thank you okay
if I move to this other machine and
bring up the contextual menu in the
finder plugins have been able to
determine several things the finder
passes object specifiers for the
contextual menu manager to let it know
what the user clicked upon in this case
it's passing an object specifier for a
folder that folder name is able to be
coerced into text so a plugin offers to
speak it and another plugin realizes
that hey there's an FF spec here so I
can compress it if I want to this isn't
just in the finder other applications
that Rev can give additional content so
if I bring up a contextual menu it's in
fact here again I have speak but other
plugins might be more intelligent about
what kind of text they act upon data
detectors in this case is able to see a
few different items in the text and
offers additional command on the
contextual menu but they will show you
more about that a little bit later on
[Applause]
so how do you go about making a
contextual menu plug-in it's pretty easy
since there's some objects you just
derive from the base class which is the
abstract cm plug-in class there are only
four methods to override it's pretty
straightforward not real tough the first
method is the initialize method this
gets called when the contextual menu
manager starts up gives your plug-in a
chance to do anything it might need in
initialization time you're passed and FS
spec that points to your plug-in in case
you need to grab resources or do other
stuff try to keep in mind that your
plug-in is going to live for the life of
the boot so don't go allocating 3
megabyte buffers that would be bad now
here's the probably the most crucial
method the examine context method this
gets called immediately before the
contextual menu is about to display so
this gets called actually for every
contextual menu click the contextual
menu manager passes an Apple event
descriptor to the plug-in this Apple
event descriptor is the exact same
descriptor that the application passes
the contextual menu manager based on
this descriptor your plug-in can add
items to the contextual menu now you
don't actually modify the menu directly
instead the contextual menu manager
gives you an Apple event descriptor list
which your plugin fills up with the
script of records that describe the
commands you want in this case here you
can see that every record has a name
which is going to get a text that's
displayed in the menu and a unique
command ID that will be returned to your
plugin if the user chooses your command
item so this is great but you saw Apple
data detectors added sub menus well you
can do that too you just add a new key
to your command record and in that key
you specify another descriptor list with
more descriptive record commands pretty
straightforward you can nest down to the
limits of the menu manager which I
believe is five levels now one of the
key design goals for Mac OS 8 was to
make it fast so that this end we don't
want contextual menus to take 2 or 3
seconds before they display your
plug-ins are passed a time limit that
they are allowed to well it's actually
the plugins responsibility to respect
this time on it but the contextual menu
manager gives them a time slice and
they're allowed to do as much processing
as they can with an
timeslice to determine what items they
can cannot add to the contextual menu
when an item is actually chosen from
your contextual menu your plugins handle
selection method is called you're given
the same Apple event descriptor so you
can go ahead and apply your command to
that descriptor and you're also passed
the unique command ID that your plugin
associated with the command that it put
in the contextual menu after the
contextual menu is displayed we've got a
fourth method that's called post menu
cleanup it's there so your plugin has a
chance to undo anything it did if it if
it happened to allocate a buffer in its
examine context method it should dispose
of it in post menu cleanup something to
keep in mind post menu cleanup is called
for your plugin regardless of whether or
not your plugins command was chosen so
there's one bug that we found and a
workaround that you can use to deal with
it the contextual menu manager
instantiates your psalm object plug-in
by name unfortunately some doesn't know
about that name before the contextual
menu manager connects to your plugin
shared library so it's your plugins
responsibility to register its name it's
actually very simple in your code
fragment initialization routine you can
instantiate one of your plugin and
immediately delete it that's good enough
and the contextual menu manager can do
the rest so once you have your plugin
you need to make it available to users
they have to have a special file type C
MPI and it has to live in the contextual
menu item subfolder of the system folder
under Mac OS 8 it's Auto routed you
don't need to worry about that and we
have a fine folder selector in case some
application might need to use it the
third piece of information that you'll
need is an extended C FRG resource this
specifies that yes you are a psalm
object specifies your class name and it
specifies what your subclasses so that
the contextual menu manager can find you
so plugins allow all kinds of great
opportunities for developers any
application that passes descriptor data
to the contextual menu manager can be
enhanced by a plugin as you can see
there's plenty of opportunities in the
finder you can tour their stuff in two
FS specs and I'll
other cool data types as you can see
there's plenty of other ways you can go
about adding items to the contextual
menu we realize that one of the cooler
aspects of contextual menu managers has
to do with clicking on text there's all
kinds of cool things you could decide to
do based on text so what we did is we
wrote Apple data detectors which is a
contextual menu plug-in that looks at
text analyzes it sees if it finds
anything important and then carries out
actions so we've spent our taking the
effort ourselves to make the text
processing engine work so that you can
just write plugins to Apple data
detectors that leverage that to make
your lives a little bit simpler so now
here's the guy that wishes I probably
spent a little bit more time on Apple
data detectives than I actually did he's
going to explain it a little in a little
bit more detail they write Apple data
detectors intelligent integration what
do we mean by that well intelligent
because like I said Apple data detectors
takes the simple data type text and find
meaningful bits of semantic data that
used to be ignored and all of a sudden
turns them into something that the
ughter user
youtr can operate on integration because
the contextual menu manager provides
this service right in a context that the
user is already in today when you leave
you'll understand the benefits that
Apple data detectors provides to the
users and to you as developers you'll
understand an overview of how all the
software works together and you'll find
out how easy it is to extend what Apple
data detectors finds and how to extend
what it does with what it finds the
benefits what are the benefits to the
user well we started with the user a
little while back in Apple's advanced
technology group a user study was
conducted
we asked users how does the Mac OS
measure up as far as user helping users
like put data away get it back in files
the users expressed that it did fine
there were no problems with that in a
surprising result was that the Mac OS
did not help enough
in letting the user move data back and
forth it offered no assistance in
handling the data there was lots of data
in the documents that the Mac OS just
let the user have to deal with through
many steps and it would be great if the
computer could help so that was the
launch of the project Apple data
detectors after it we worked the kinks
out in Apple's advanced technology group
it was transferred to the OS Technology
Group where it was productized and is on
the verge of being available to
end-users and to you at this time I'd
like to show you a demo of what the
end-users experiences with Apple data
detectors this is a document and in it I
type the email address a URL on an FTP
site so the user experience involves
selecting the text control clicking and
Apple data detectors after receiving the
text from the contextual menu manager
populates the contextual menu with
actions that could be taken on the
different data that was found so here's
my email address and if you're if you
use klaris email or you could simply
select this and instead of cutting
pasting finding claireaussi mailer and
then pasting in the text i'm immediately
ready to send myself an email another
example is the URL instead of again
cutting pasting launching netscape i'm
have immediate access to it by simply
selecting one item off the contextual
menu
how that is the simple yet integrated
user experience that Apple data
detectors provides the configuration
aspect of Apple data detectors involves
a control panel where the user can
further test ok well this is not what it
looks like at home sorry well sorry this
says email address
so what oh push ups I was last year
email it this is the email address
detector currently it has Apple email
address detector installed with a list
of actions and the user can say well I
don't use americon line or cyber dog I
use clarity mailer so this is the mailer
that I would leave running to work with
when I use it so a guy explained a
little bit about how these pieces are
working together basically the users in
front of the client application the
client application passes the selection
off of the spell checker and file stuff
are going to get a chance to look at it
and so as a plugin that's going to pass
the text to Apple data detectors and
then based on the detectors and the
actions it installed the extension will
populate the contextual menu and if the
user selects an item the action will be
executed as you saw also the user can
configure what they want through the
control panel which again talks to the
Apple data detectors extension extending
what Apple data detectors finds is
really easy I don't know how many of you
follow the CS course but if you have you
might remember compilers class and this
great book the dragon books yeah a lot
of the technology is coming pretty much
out of this book I mean we took regular
expressions and applied them to a
meaningful user experience other
concepts involved their parsers parse
trees and ambiguity and if any of you
remember what amber
videos you're far along so what we did
is we took the regular expression
language beefed it up a little bit and
turned it into a Mac OS technology this
is an example this example is my holiday
would be the detector name following
that is a description string that shows
up in the control panel if the user
selects good detector and then this
detector would find the exact string
July 4 so starting with how to write the
detection rules the most simple type of
expression are what I call atomic
expressions hydrogen and neutron
expressions will be made available later
but for right now we only have atomic
expressions and they okay my roommate
said you wouldn't get it
so for atomic expressions we have
character set and character sequence in
a character set and if any one of the
characters are detected the expression
evaluates to true and for a character
sequence all the characters must be
found in the order specified going a
little more complex compound expressions
are our expressions that contain the
Tomic expressions or other compound
expressions again there's the set
sequence idea for a set if any of the
expressions evaluates to true the
expression evaluates to true and for a
sequence all expressions must evaluate
to true in the order declared for that
expression to be evaluated to true and
in the definition of a detector
it can make reference to another
detectors definition we call these
detector references so in this case date
is making use of the definitions for day
of week and month in its own definition
a powerful part of regular expressions
is their ability to express repeating
and optional patterns these symbols in
our language lets you do that
this comes straight out of the Dragon
book asterisk plus and question mark
letting me represent repeating or
optional patterns for the detector this
sequence of examples goes from very
specific to very generalized way of
expressing date the first example will
find exactly April 5th 1995 the next one
generalizes the
to January and February by indicating an
expression set of character sequences
January and February in the next example
I generalized the day and you feel
closely this example will find the day 0
through 39 so it needs a little more
work to find 1 through 31 in the next
example we took the definition for month
out put it in its own detector and
referred to it with the name month we
also generalized the year to find any
year in the 1990 decade and in the last
example we took all the definitions out
gave them their own names and refer to
them by their name in the definition and
made your optional data detectors is
more than just a recognition engine its
parser - and if you put labels in front
of the sub detectors in a detectors
definition those labels will be useful
in the action and the action can refer
to them when it's dealing with the data
so in this case email address is making
available the sub detected text for user
and host with the labels of the user and
the host well with Apple and all of you
- finding so many detectors it was going
to be a wonder that we wouldn't all
clobber each other so every detector
file has its own namespace and you don't
have to worry about other developers
writing other detectors with the exact
same name but there is a global
namespace if you want to cooperate with
one another a registry is underway and
hopefully will be available a little
later all of apples detectors are
currently exported to the global
namespace and you can use them the way
that you put a detector in the global
namespace is by placing a caret after
the detector name and the way you refer
to a detector in the global namespace is
by placing a caret after the detector
name on the right side of the definition
undoubtedly in your detector files
you'll be writing more detectors than
you'd ever want the user to see like
alpha and digit and they don't really
care about those so the ones that you do
want the user to see in the control
panel you place an exclamation point
after the detector name I pick that and
I don't know why it's just meant
see it so other ways that the detectors
show up in the control panel is by if an
action attaches to a detector then it
will automatically be displayed in the
control panel for the user's
configuration customisable detectors
besides data types that can be expressed
by patterns there are simple lists of
strings that are specific types of data
that users have in their own context and
data detectors should be aware of them
these include things like conference
rooms restaurants people and other
detectors can make use of them so for
example if you wrote a meeting detector
it could make reference to the
conference room detector now the meeting
detector would contain detectors like
dates and times which are pattern
detectors and then perhaps a conference
room detector which the user can
populate with conference rooms in their
own building the way that you specify a
customizable detector is by placing a
pound sign after the detector name and
then making the definition of the
specific format an expression set of
character sequences so in this example
the expression set contains the
character sequences calm and dotnet and
I'd like to show you where in the
control panel the user can add to your
customizable detectors I have to bring
this broken thing up again in the file
menu if they go to the show customizable
detectors Apple is initially shipping to
customizable detectors Apple hosts
domain and Apple news category instead
of specifying every single country as a
part of a host we picked the normal
endings and a few other countries the
user can come here and specify other
countries that we did not include as
part of the host suffix and add it and
then email addresses and HTTP URLs and
hosts will make use of the new
definition to detect more data
guidelines I only have one guideline
that I can remember back from class and
that I've actually seen the very mean to
the Apple data detectors engine and it's
ambiguity in this example the pattern
looks for a through D followed by or 0
or more times followed by a period a
through Z zero or more times so for this
first example if on the input string
there's a capital B does it go in the
first expression or the second you could
say either and you would be right and
this is called ambiguity and this is
Apple data detectors worst enemy for
performance so while you're writing
detectors you need to avoid ambiguity as
much as possible in this example what I
really meant to say was a through D
followed by any number of period a
through these so I took the period out
and that's specifically separating the A
through D and a through Z expressions
this is my one guideline to you to help
Apple data detectors perform as well as
possible well beyond regular expressions
I did learn how to use a chart parser at
Apple and that is also in the engine
depending on the complexity of your
detectors a deterministic finite
automata can be built from your regular
expression this makes the engine very
zippy but if you decide to write a
detector that is just a little too
complex that there's not enough memory
or time to construct the deterministic
finite automata the chart parser is used
now the chart parser is pretty hungry
when it comes to memory and time but we
try to offload as much as we can to the
deterministic finite automata so for
example let's say that the email address
detector was so complex that it simply
could not be turned into a DFA but the
user detector and the host detector were
simple enough that we could well then
the DFA for the user and the host
detector will be used and the chart
parser will be used to tie them together
and as long as there's no ambiguity
between the host and the user detector
the engine will perform just fine how
many of you remember that from
how's class books extending what Apple
data detectors does with what it finds
is just as easy we're using an already
known technology Apple script so what is
an Apple data detectors action it's an
Apple script script an Apple script
applet or an Apple event aware
application and these are not this does
not mean your application these are
applications that live specifically in
the Apple data detectors folder in the
actions folder of the Apple David Tutera
the system folder so they the action
requires a resource and that it responds
to a specific Apple event the resource
tells data detectors which detector it
would like to support which strings
should be put into the contextual menu
and if you'd like a description string
that can be shown in the control panel
we chose the text resource one one to
eight and here's an example of the
format this action would be saying that
it would like to support the email
address detector in the Apple namespace
or the Apple detector file it wants send
email with clarity mailer to be
displayed in the contextual menu and it
would like this string shown in the
control panel when the user clicks on
the action in the control panel why did
we pick a text resource with a positive
number this is the exact same text
resource that Apple script scripts use
for their descriptions when displayed in
the Apple script script editor how many
times can i say script why did we do
this for discoverability we found while
people were test developing actions that
they would often duplicate an action the
hidden resources underneath were unknown
to them and they simply could not get
the action to support the detector that
they wanted to support or they could not
change the contextual menu the string
displayed so it was chosen for
discoverability of reasons and also so
that you so that Apple scripts savvy
users only have used the script editor
and not also res edit when developing
Apple the data detector actions this is
the Apple event that your action must
respond to it's called handle detected
data when the appropriate scripting
Edition is
which will be available during the SDK
for some of you you know what it looks
like if the scripting Edition isn't
there what's passed to the action is an
apple event record there are many fields
in that record that you can use in this
example this action is making use of the
detected text field to get all of the
text that was found for this in this
case an email address and it places it
in another apple event record to be sent
off to klaris emailer to create a new
message as I said before Apple data
detectors is more than a recognizer it's
also a parser and in this case the field
to get to those sub detected parts is
the parse tree this it looks like the
detected data coming in here as a
meeting and the action is trying to get
to the sub detected field called start
date well when I first started writing
detector files myself for Apple data
detectors I spent a half hour looking
for a comma that was supposed to be
somewhere and all data detectors would
tell me that the file was invalid well
to prevent you from that headache we're
going to be providing you with a tool
that does syntax checking and based on
some feedback from a contractor that we
hired to write detectors we also have
some pretty other cool features that
will help you test the results of your
detectors and easily view how they work
with each other what can you do to start
well as you can see this technology is
pretty simple and yet for the user
experience is pretty powerful
well it takes it beyond being simple and
powerful is the content that Apple and
you provide to the end user so the way
to start is to adopt the contextual menu
for now we've included an enabler that
will help your app along by using the
clipboard but we plan on phasing this
out and your app needs to quickly adopt
a contextual menu to get the user access
to the amazing services that can be made
available in the context that they're in
and if your application is not
scriptable this is an excellent reason
and time
to make it scriptable even if you don't
plan on writing Apple data detectors
actions other people can make use of
your application if it's scriptable we
have our wish list for detectors that we
didn't have time to ride and this is
just a short list and the most
surprising one I think for me was the
chemical symbols when we show this
technology to a certain company we found
out that they represented chemical
symbols in text those things are
obviously not live objects but Apple
David detectors is able to make them so
and then the action is to show them
drawn in the molecular form in an
application that does that but other
ones that are just as needed our phone
numbers dates times meeting mailing
addresses and whatever you can think of
that we didn't and I know there's a lot
and then of course writing actions that
operate on these different types of data
Apple data detectors is a great example
of how much Apple wants to continue
innovation and improve the user
experience this is a step towards making
the user experience even more task
centered instead of step or tool
centered again I told you what
intelligent integration means and one
our way but we need the content which is
why we're so committed to cooperating
and working with you to make sure that
this technology can grow and help the
user the way to stay in touch is through
this webpage and also through our
evangelist Gordon Gard
we really appreciate your feedback we
recently held a kitchen and we grabbed
great feedback that's already been put
on a feature list for future versions so
at this time we are going to have QA so
I'd like to invite Gordon and other
members of the panel to come on stage
[Applause]
you listen to us we'll listen to you now
I know there are three mics in this room
from the previous sessions I promise not
to miss the the center mic please limit
yourself to one question at a time and
this time I'll start with the center
mine Tom Pittman itty-bitty computers
I might complain a little bit about your
promoting like competitors book I wrote
a compiler book although prentice-hall
that's okay
the dragon book sells more than mine
does the question has to do with your
date detection if people are writing
regular expressions to detect a date
they are going to break far more often
than people are going to be happy with I
hope you're going to do something better
than that a future we have written a few
date examples back at Apple and
distributed them they actually don't
break more than they should
but another feedback that we got was it
would be great if Apple data detector
supported programmable detectors perhaps
that would be an example for that Linda
Fowler with aus text
I've written some QuickTime components
or actually they're using the component
manager but they're not really for
QuickTime but my question is the
extensions manager currently does not
recognize them at all they don't show up
in the extensions manager and the
resources you were talking about the CCI
resources in H SDR and so forth is that
going to be supported for the thng
components in Mac OS 8 like I said right
now it's they don't they don't even show
up so so the a shipyard resource is
definitely supported if you double taken
a quick gun component the balloon that
the finder will display will be this
distension TR resource of its program
the white people just display a standard
message that's not very very informative
extension metric currently does not
display
session geez and the reason for that is
because they are not things that act at
startup turning them on and off is not
an effector or your startup sequence in
any way however this is something that
we're looking at whether we should or
should not display a church and geez
there are the kind of fires also that
are not really all of the startup
sequence but I don't look at this isn't
folder so we're not changing that for
Mac website but we're looking at it see
if it makes sense for photo subversion
NAT McCauley klaris I have a question
about world script support in these
contextual menus and in the data
detectors I didn't notice any script
information being passed when you're
passing this text information to and
from the various thing so if I wrote an
extension to a menu that had Japanese
text in and I want to be able to tell
whoever it is to display the menu
extension in Japanese but it doesn't
look like there's any support for that
is there yeah there actually is from the
contextual menu side of things every
command Apple event record the text that
you want displayed in the contextual
menu is actually supposed to be an int
el text type so you can specify script
information and I make sure to pass that
on to the menu manager when I display
the string or when I add the string to
the menu so it will display correctly
and for the context for the day a
detector part of the API is at the same
type of text just in case I understand
your question when the apple pie
application passes text to the
contextual menu manager which gets
passed on to the plugins the most common
data type I'm so far seeing a styled
text which that means if the user
selection is containing style text which
contain script information I can get the
International I convert it to Unicode at
that point and then again yeah by
passing back the information guys that
I'm allowed to also display
international strings in the contextual
menu another thing that's that reminds
me that we haven't talked about in
previous sessions but that what other
changes that we've made for Mac OS 8 is
actually that the menu manager
now support scripted codes you can
specify different scripts couple
different menu items and in one given
menu so that's architecture then you can
do that looks like this is the last
question Levi Brown semantics I'm gonna
question about the extensions manager
right now if I understand correctly the
sets are defined as as just single set
and if you have a set you can modify it
and that's it and if you have a set that
extends from another set if the previous
set changes none of the changes were
propagated what I would like to see or I
hope other people like to see is two
would be an object-oriented set
structure so you could have a base set
that would then you can inherit sets off
of that and if the base that changed all
children sets then change to okay makes
sense yes that's an interesting idea
we obviously we won't have time to do
that for my class a isn't good but
that's an interesting idea we're looking
to it there are many changes the mini
improvement that's we still want to do
to extension manager so thanks for the
suggestion sure okay we do have one more
question over here he reminded me of a
question under suggest for the
extensions manager
um I know use the verge to resource for
get your package information and that's
great it'd be nice to be able more
flexible not too there's another fine a
new resource or something like that so
we could package things together
intelligently instead of relying on the
version 2 resource which may not always
want to do just suggestion yeah that's
something that's been the thought of
that the reason why we use the verse to
resource are just is because it's
already they're sort of used by many
applications and software packages but
we're thinking about having another
specific resource optionally that could
be used ok thank you very much I want to
encourage everyone to attend the session
tomorrow morning at 9:50 on the Apple
information access toolkit that's the
third in our use
Experion sessions this session and the
preceding one will also be repeated on
fridays you got it got here late and
want to want to catch what you missed
otherwise thank you very much of a great
conference
[Applause]