Labs/Ubiquity/Ubiquity 0.5 Author Tutorial: Difference between revisions

Jump to navigation Jump to search
m
s/Switching:/Switching Tabs:/
m (s/Switching:/Switching Tabs:/)
Line 693: Line 693:
We'll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.
We'll write this command in two steps. The first step is creating a tab noun-type. The second step is using that noun-type to create the tab-switching command.


== Switching: Writing your own Noun-Types ==
=== Switching Tabs: Writing your own Noun-Types ===


A noun-type needs to only have two things: A <code>label</code> and a <code>suggest()</code> function.  It can optionally also have a <code>default()</code> function.
A noun-type needs to only have two things: A <code>label</code> and a <code>suggest()</code> function.  It can optionally also have a <code>default()</code> function.
73

edits

Navigation menu