[Tcladdressbook-commits] Help TclAB_QuickStart.html,1.4,1.5
Status: Alpha
Brought to you by:
bdesgraupes
|
From: <bde...@us...> - 2004-01-06 06:58:35
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv22336/Help Modified Files: TclAB_QuickStart.html Log Message: [create] examples Index: TclAB_QuickStart.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TclAB_QuickStart.html 5 Jan 2004 05:38:25 -0000 1.4 +++ TclAB_QuickStart.html 6 Jan 2004 06:58:32 -0000 1.5 @@ -16,10 +16,10 @@ <!-- :Keywords: Address book, data base --> <!-- :TclCmd: set currentversion [package require addressbook] --><P><!-- logo --> <P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P> -<P> <A href="TclAB.html"> Home Page</A> | <A href="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> +<P> <A href="TclAB.html">Home Page</A> | <A href="http://sourceforge.net/projects/tcladdressbook"> Project Page at SourceForge</A><P><HR><BLOCKQUOTE><P><I> This file is a tutorial that demonstrates the [addressbook] command defined by the Tcladdressbook extension for Tcl. It documents -version 1.0d12. +version 1.0b1. For a detailed and complete description of the syntax of each subcommand, refer to the <A href="TclAddressBookHelp.html">help file</A>. </I></P></BLOCKQUOTE><HR> @@ -59,7 +59,7 @@ </PRE> List the subgroups of a specific group (ID and name) <PRE> - set groupid [lindex [addressbook groups -ids] 2] + set groupid [lindex [addressbook groups -ids] 0] addressbook groups -ingroup $groupid </PRE> List the subgroups of a specific group (only ID) @@ -86,7 +86,7 @@ </PRE> The value of <I>myrecord</I> is a keyed list. One can use the usual Tcl list commands to parse this value or special commands defined in the TclX -extension (see section <I>Using keyed lists</I> below).<P><H3><A NAME="M6"></A> The [record] command</H3> +extension (see section <A href="#ukl">Using keyed lists</A> below).<P><H3><A NAME="M6"></A> The [record] command</H3> Store the ID of the first record in the variable <I>theid</I> <PRE> set theid [lindex [addressbook persons -ids] 0] @@ -136,7 +136,21 @@ <PRE> addressbook parents -ids $theid </PRE><P>One can also find the parents of a group using this command.<P><H3><A NAME="M10"></A> The [create] command</H3> - (group|person)<P><H3><A NAME="M11"></A> The [property names] command</H3> +One can create either a group's or a person's record. The third argument +will be the "name" of the new record, that is to say the name of the new +group or the last name of the new person respectively. The command returns +the unique ID of the created record. For instance: +<PRE> + addressbook create group WorkingCommittee + addressbook create person Beethoven +</PRE> +One can make them subgroups or members of an already existing group using +the <I>-ingroup</I> option: +<PRE> + set grpid [lindex [addressbook groups -ids] 0] + set subgrpid [addressbook create group Composers -ingroup $grpid] + addressbook create person Beethoven -ingroup $subgrpid +</PRE><P><H3><A NAME="M11"></A> The [property names] command</H3> Get the list of all existing properties for groups or for persons <PRE> addressbook property names -groups @@ -260,7 +274,8 @@ <LI> Empty label and key to search on all labels and keys <PRE> addressbook search -persons -nocase Address >= {"" {"" abc}} -</PRE><P></UL><P><H2><A NAME="M20"></A> Using keyed lists</H2> +</PRE><P></UL><P><A name="ukl"></A> +<H2><A NAME="M20"></A> Using keyed lists</H2> Keyed lists can be easily manipulated using the <B> keylget </B> and <B>keylset</B> commands defined by the TclX extension. For instance, if a record has been stored in some variable <I>myrecord</I>, one can extract @@ -280,6 +295,6 @@ keylget grp GroupName clock format [keylget grp Modification] </PRE><P><HR> -<P> Last updated 2004-01-04 21:19:33<P> +<P> Last updated 2004-01-06 07:32:36<P> </BODY> </HTML> |