Skip to content
devpqa3.htm 13.2 KiB
Newer Older
O'Reilly Media, Inc.'s avatar
O'Reilly Media, Inc. committed
<HTML><HEAD>
<TITLE>devpqa</TITLE>
	<META NAME="PalmComputingPlatform" CONTENT="TRUE">
	<META NAME="PalmLauncherRevision" CONTENT="1.0">
	<META NAME="HistoryListText" CONTENT="DP &Date &Time">
</HEAD><body><A HREF="devPQA2.htm">Previous</a><BR></FONT><B><FONT FACE="Palatino,Book Antiqua" SIZE=5><P><A NAME="Icons">Icons </A></P></B></FONT><FONT FACE="Palatino,Book Antiqua"><P>Every application on the Palm VII needs two icons -- a large icon for use in the application launcher’s Icon view, and a small one for use in List view. You can create your own icons, or you can let QABuilder provide default generic icons: a small and large solid black diamond with the familiar "over the air" lines on the right side. </P>

<center><img src="d-6.gif" WIDTH=153 HEIGHT=77><BR><BR><BR><HR><img src="d-7.gif" WIDTH=153 HEIGHT=54><BR><BR><BR><HR><img src="d-8.gif" WIDTH=121 HEIGHT=57><BR><BR><BR><HR><I>Figures D-6 through D-8<br> 

The small icons can have a similar theme to the large icons or, 
if you want, you can just use the default.<BR></I></center>
</FONT><B><FONT FACE="Palatino,Book Antiqua" SIZE=5><P><A NAME="NotesforHTMLcoders">Notes for HTML coders</A></P></B></FONT><FONT FACE="Palatino,Book Antiqua"><P>Most of the commands and controls in the HTML 3.2 specification work on the Palm VII. However, a few common codes don’t work: vertical alignment </FONT><FONT SIZE=2>(the </FONT><FONT FACE="Courier New" SIZE=2>VALIGN</FONT><FONT SIZE=2> </FONT><FONT FACE="Palatino,Book Antiqua">attribute to various tags), nested tables, subscripts, superscripts, small text, the </FONT><FONT FACE="Courier New" SIZE=2>LINK</FONT><FONT FACE="Palatino,Book Antiqua"> tag, the </FONT><FONT FACE="Courier New" SIZE=2>APPLET</FONT><FONT FACE="Palatino,Book Antiqua"> tag, and the </FONT><FONT FACE="Courier New" SIZE=2>ISINDEX</FONT><FONT FACE="Palatino,Book Antiqua"> tag.</P><P>Only four colors are supported: </FONT><FONT FACE="Courier New" SIZE=2>Black="#000000",</FONT><FONT FACE="Palatino,Book Antiqua"> </FONT><FONT FACE="Courier New" SIZE=2>Silver="#C0C0C0C0"</FONT><FONT FACE="Palatino,Book Antiqua"> (light gray), </FONT><FONT FACE="Courier New" SIZE=2>Gray="#808080"</FONT><FONT FACE="Palatino,Book Antiqua"> (dark gray) and </FONT><FONT FACE="Courier New" SIZE=2>White="#FFFFFF"</FONT><FONT SIZE=2>. </FONT><FONT FACE="Palatino,Book Antiqua">If you enter in any other color number, it will be "rounded off" to the closest of these four colors, often with unfortunate results. Graphics can’t be153x144 pixels, and sequential .gif animation is not supported (thank goodness).</P><P>The </FONT><FONT FACE="Courier New" SIZE=2>Body</FONT><FONT FACE="Palatino,Book Antiqua"> tag only supports </FONT><FONT FACE="Courier New" SIZE=2>BGCOLOR</FONT><FONT FACE="Palatino,Book Antiqua"> and </FONT><FONT FACE="Courier New" SIZE=2>TEXT</FONT><FONT FACE="Palatino,Book Antiqua"> tags. There are also limitations on the types of fonts -- Clipper does a decent job of differentiating among the various subtle font variations allowed in the 3.2 HTML specification (such as </FONT><FONT FACE="Courier New" SIZE=2>&lt;SAMP&gt;</FONT><FONT FACE="Palatino,Book Antiqua">, </FONT><FONT FACE="Courier New" SIZE=2>&lt;STRONG&gt;</FONT><FONT FACE="Palatino,Book Antiqua"> and </FONT><FONT FACE="Courier New" SIZE=2>&lt;EM&gt;</FONT><FONT FACE="Palatino,Book Antiqua">), but there are only so many different fonts that will work with so few pixels. Therefore, for example, </FONT><FONT FACE="Courier New" SIZE=2>&lt;SAMP&gt;</FONT><FONT FACE="Palatino,Book Antiqua">, </FONT><FONT FACE="Courier New" SIZE=2>&lt;CODE&gt;</FONT><FONT FACE="Palatino,Book Antiqua"> and </FONT><FONT FACE="Courier New" SIZE=2>&lt;KBD&gt;</FONT><FONT FACE="Palatino,Book Antiqua"> are all translated into TD Monospace. And </FONT><FONT FACE="Courier New" SIZE=2>&lt;FONT&gt;</FONT><FONT FACE="Palatino,Book Antiqua"> attributes like "Arial" are ignored. </P><P>A few HTML tricks that aren’t actually in the 3.2 specification, but have become widespread, also don’t work on the Palm VII: </FONT><FONT FACE="Courier New" SIZE=2>Frames</FONT><FONT FACE="Palatino,Book Antiqua">, any form of image maps, and any kind of scripting (like javascript).</P><B><P><A NAME="CoolNewTags">Cool New Tags</A></P></B><P>On the other hand, the Palm VII accommodates a number of new tags that, while they’re not part of the standard HTML vocabulary, take advantage of the Palm VII’s special capabilities:</P> 

<UL><LI>Two new input types -- </FONT><FONT FACE="Courier New" SIZE=2>Datepicker</FONT><FONT FACE="Palatino,Book Antiqua"> and </FONT><FONT FACE="Courier New" SIZE=2>Timepicker</FONT><FONT FACE="Palatino,Book Antiqua"> -- allow the user to select a date and time in the standard Palm fashion (illustrated in Chapter 2). The date and/or time information will be passed on to the server in standard Internet formats--YYYY-MM-DD and hh:mm, respectively. </LI><LI>Several META tags are specific to Palm VII web clipping, too. These all have the form </FONT><FONT FACE="Courier New" SIZE=2>&lt;META NAME="tagname" CONTENT="VALUE"&gt;</FONT><FONT SIZE=2> </FONT><FONT FACE="Palatino,Book Antiqua">and go into the</FONT><FONT SIZE=2> </FONT><FONT FACE="Courier New" SIZE=2>&lt;head&gt;</FONT><FONT SIZE=2> </FONT><FONT FACE="Palatino,Book Antiqua">section.</LI></UL>
 
<P>The </FONT><FONT FACE="Courier New" SIZE=2>"PalmComputingPlatform"</FONT><FONT FACE="Palatino,Book Antiqua"> metatag (with a content of </FONT><FONT FACE="Courier New" SIZE=2>"TRUE"</FONT><FONT SIZE=2>)</FONT><FONT FACE="Palatino,Book Antiqua"> tells the Palm VII server that you have a "Palm-friendly" site. The Palm.net server will allow graphics, and generally treat your content with less suspicion, if your PQA includes this tag. </P><P>The </FONT><FONT FACE="Courier New" SIZE=2>"HistoryListText"</FONT><FONT FACE="Palatino,Book Antiqua"> metatag lets you specify how pages will appear in the History List on the Palm VII, the shown in Chapter 16. You can specify any text. The special strings </FONT><FONT FACE="Courier New" SIZE=2>&amp;date </FONT><FONT FACE="Palatino,Book Antiqua">and </FONT><FONT FACE="Courier New" SIZE=2>&amp;time</FONT><FONT FACE="Palatino,Book Antiqua"> indicate that you want the date or time inserted into the History List text. </P><P>The </FONT><FONT FACE="Courier New" SIZE=2>"PalmLauncherRevision"</FONT><FONT FACE="Palatino,Book Antiqua"> metatag lets you set the revision date on your PQA as it appears in the version list of the the Palm application launcher. As any developer knows, adding a revision number to a program can save a great deal of confusion later. </P><P>The </FONT><FONT FACE="Courier New" SIZE=2>"LocalIcon"</FONT><FONT FACE="Palatino,Book Antiqua"> metatag tells the QABuilder program to include files (for example, graphics) in the PQA that aren’t actually used by the PQA, but instead are elsewhere on the Palm VII. The server can reference these files much more cheaply because they are already on the device. </P> 

<UL><LI>You can use two special strings in your coding: </FONT><FONT FACE="Courier New" SIZE=2>"%zipcode"</FONT><FONT FACE="Palatino,Book Antiqua"> and </FONT><FONT FACE="Courier New" SIZE=2>"%deviceid"</FONT><FONT SIZE=2>. </FONT><FONT FACE="Palatino,Book Antiqua">The Palm VII server will replace the first with the current zip code of the device, and the second with the device’s unique ID number. You can use the first to return location specific information (such as the nearest store) and the second to track information about the user (for example, which stocks he has in his portfolio). </LI></UL>
 
<P>Use caution with both of the special strings. The zip code is based on the location of the radio base station, but a particular Palm VII might use base stations across several zip codes. Furthermore, the Palm VII’s unique ID can be "spoofed" using a web browser, which contacts your server directly without going through the Palm VII servers. </P> 

<UL><LI>The tag pair </FONT><FONT FACE="Courier New" SIZE=2>&lt;SMALLSCREEENIGNORE&gt;</FONT><FONT FACE="Palatino,Book Antiqua"> and </FONT><FONT FACE="Courier New" SIZE=2>&lt;/SMALLSCREENIGNORE&gt;</FONT><FONT FACE="Palatino,Book Antiqua"> can be used to identify portions of a web page that you don’t want to show up on a small screen. In other words, thanks to these tags, you can design just one web page (or CGI) that will work for both a standard browser and a Palm VII. Just make sure to mark with these tags all the material you don’t want transmitted to the Palm VII. </LI><LI>You can even create links in your PQA to other Palm applications, in effect turning your PQA into a launcher. If you put a tag in your HTML like this:</LI></UL>
 
</FONT><FONT FACE="Courier New" SIZE=2><P>&lt;A HREF="palm:addr.appl"&gt;Address Book&lt;/A&gt;</P></FONT><FONT FACE="Palatino,Book Antiqua"><P>... then "Address Book" will appear in your PQA as link. When the Palm VII user taps it, the Palm VII launches the Address Book! All the standard applications on the Palm VII have four-character abbreviations. You can look them up either in the table below, in the Palm VII Content Style guide, or in the Launcher sample PQA included on this book’s CD, which uses these tags to create a launching pad on a single PQA screen. </P> </FONT>
<center><img src="d-9.gif" WIDTH=144 HEIGHT=144><BR><I>Figure D-9<br> 
The Launcher PQA demonstrates that you can call regular applications from your PQA.<BR><BR></I></center>

<TABLE ><TR><TD WIDTH="43%" VALIGN="TOP" HEIGHT=17> 
<P><B><FONT FACE="Arial">HREF Code </B></FONT></TD><TD WIDTH="57%" VALIGN="TOP" HEIGHT=17> 
<B><FONT FACE="Arial"><P>Application Called </B></FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">calc</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Calculator </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">secr</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Security </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">pref</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Preferences </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">addr</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Address </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> <FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">todo</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>ToDo  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">date</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Datebook  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">memo</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>MemoPad  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">sync</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>HotSync  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">mail</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Mail  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">exps</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Expense  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">lnch</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Launcher  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">clpr</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Clipper  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP">  
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">setp</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Setup  </FONT></TD></TR><TR><TD WIDTH="43%" VALIGN="TOP"> 
<FONT FACE="Courier New" SIZE=2><P>palm:</FONT><FONT FACE="Palatino,Book Antiqua">memr</FONT><FONT FACE="Courier New" SIZE=2>.appl </FONT></TD><TD WIDTH="57%" VALIGN="TOP"> 
<FONT FACE="Arial"><P>Memory  </FONT></TD></TR></TABLE><A HREF="devPQA4.htm">Next</a></BODY></HTML>