tcladdressbook-commits Mailing List for TclAddressBook (Page 8)
Status: Alpha
Brought to you by:
bdesgraupes
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(114) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(37) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(70) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
(2) |
Apr
(9) |
May
|
Jun
(8) |
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <bde...@us...> - 2004-01-06 06:59:00
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv22419/Help Modified Files: TclAddressBookHelp.aida Log Message: Simplified subst tags Index: TclAddressBookHelp.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.aida,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- TclAddressBookHelp.aida 5 Jan 2004 06:12:42 -0000 1.10 +++ TclAddressBookHelp.aida 6 Jan 2004 06:58:56 -0000 1.11 @@ -7,7 +7,6 @@ !! !! :Created: 2003-11-26 14:30:03 :Modified: 2004-01-05 06:42:28 !! !! :Keywords: Address book, data base -:TclCmd: set currentversion [package require addressbook] !! logo @@ -17,7 +16,7 @@ ((/ This is a manual page for the Tcladdressbook extension for Tcl. It -documents version ((s $currentversion s)). +documents version ((s [package require addressbook] s)). /)) ((toc @@ -148,9 +147,8 @@ ((s3 addressbook record ((i recordID i)) This command returns all the data available in the database concerning the record with unique ID ((i recordID i)). The returned value -takes the form of a keyed list: see the ((b addressbook record b)) command -for a description of this format. -((nl The format used for a particular value depends on the type of +takes the form of a keyed list. +((nl The format used for a particular property's value depends on the type of the property (string, integer, date, multivalue etc.). Some properties have a multiple type: MultiString for fields like Email, Phone etc., MultiDate for fields like ABDate, MultiDictionary for the Address field. In case of a |
|
From: <bde...@us...> - 2004-01-06 06:58:54
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv22396/Help Modified Files: TclAddressBookHelp Log Message: Simplified subst tags Index: TclAddressBookHelp =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- TclAddressBookHelp 5 Jan 2004 06:12:34 -0000 1.11 +++ TclAddressBookHelp 6 Jan 2004 06:58:51 -0000 1.12 @@ -1,11 +1,7 @@ Title: Tcladdressbook Help Project: addressbook extension for Tcl Modified: 2004-01-05 06:42:28 -TclCmd: set currentversion [package require addressbook] - -Images/TclAB_logo.gif (TclAB Logo) - Home Page | <http://sourceforge.net/projects/tcladdressbook> Project Page at SourceForge <TclAB.html> Abstract @@ -176,9 +172,8 @@ addressbook record recordID This command returns all the data available in the database concerning the record with unique ID recordID. The returned value -takes the form of a keyed list: see the addressbook record command -for a description of this format. - The format used for a particular value depends on the type of +takes the form of a keyed list. + The format used for a particular property's value depends on the type of the property (string, integer, date, multivalue etc.). Some properties have a multiple type: MultiString for fields like Email, Phone etc., MultiDate for fields like ABDate, MultiDictionary for the Address field. In case of a @@ -362,7 +357,7 @@ ---------------------------------------------------------------------- - Last updated 2004-01-05 07:07:40 + Last updated 2004-01-06 07:36:29 |
|
From: <bde...@us...> - 2004-01-06 06:58:41
|
Update of /cvsroot/tcladdressbook/Help
In directory sc8-pr-cvs1:/tmp/cvs-serv22365/Help
Modified Files:
TclAB_QuickStart.tcl
Log Message:
[create] examples
Index: TclAB_QuickStart.tcl
===================================================================
RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.tcl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- TclAB_QuickStart.tcl 5 Jan 2004 05:38:32 -0000 1.4
+++ TclAB_QuickStart.tcl 6 Jan 2004 06:58:38 -0000 1.5
@@ -130,6 +130,21 @@
# One can also find the parents of a group using this command.
# # The [create] command
+# 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:
+
+% addressbook create group WorkingCommittee
+% addressbook create person Beethoven
+
+# One can make them subgroups or members of an already existing group using
+# the -ingroup option:
+
+% set grpid [lindex [addressbook groups -ids] 0]
+% set subgrpid [addressbook create group Composers -ingroup $grpid]
+% addressbook create person Beethoven -ingroup $subgrpid
+
# # The [property names] command
@@ -289,8 +304,6 @@
% addressbook search -persons -nocase Address >= {"" {"" abc}}
-
-
# # Using keyed lists
# Keyed lists can be easily manipulated using the keylget and
# keylset commands defined by the TclX extension. For instance, if a
@@ -311,10 +324,5 @@
% keylget grp GroupName
% clock format [keylget grp Modification]
-
-
-
-# # ----------------------------------------------------------------------
-# # Last updated ((s [ISOTime::ISODateAndTimeRelaxed] s))
|
|
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> |
|
From: <bde...@us...> - 2004-01-06 06:58:32
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv22313/Help Modified Files: TclAB_QuickStart.aida Log Message: [create] examples Index: TclAB_QuickStart.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.aida,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TclAB_QuickStart.aida 5 Jan 2004 05:37:43 -0000 1.4 +++ TclAB_QuickStart.aida 6 Jan 2004 06:58:26 -0000 1.5 @@ -80,7 +80,7 @@ |)) 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). +extension (see section ((lk #ukl ))Using keyed lists lk)) below). ((s2 The [record] command @@ -151,7 +151,22 @@ One can also find the parents of a group using this command. ((s2 The [create] command - (group|person) +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: +((| + addressbook create group WorkingCommittee + addressbook create person Beethoven +|)) +One can make them subgroups or members of an already existing group using +the ((i -ingroup i)) option: +((| + set grpid [lindex [addressbook groups -ids] 0] + set subgrpid [addressbook create group Composers -ingroup $grpid] + addressbook create person Beethoven -ingroup $subgrpid +|)) + ((s2 The [property names] command Get the list of all existing properties for groups or for persons @@ -313,7 +328,7 @@ lu)) - +((a ukl)) a)) ((s1 Using keyed lists 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 |
|
From: <bde...@us...> - 2004-01-05 13:27:03
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl In directory sc8-pr-cvs1:/tmp/cvs-serv17345/Contribs/Tcl Added Files: ABtoTclArrays.tcl Log Message: First checkin --- NEW FILE: ABtoTclArrays.tcl --- (This appears to be a binary file; contents omitted.) |
|
From: <bde...@us...> - 2004-01-05 08:13:53
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1:/tmp/cvs-serv26205/Source Modified Files: Changes.Log Log Message: First public beta release Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Changes.Log 28 Dec 2003 07:50:45 -0000 1.11 +++ Changes.Log 5 Jan 2004 08:13:49 -0000 1.12 @@ -28,15 +28,18 @@ Last modification: $Date$ ================================================================================ -= 1.0 released last update: += 1.0b1 released last update: 2004-01-05 09:00:50 ================================================================================ + Added a "Contribs" directory to the project on SourceForge for code + contributions (Tcl scripts making use of the Tcladdressbook extension...). + Completed documentation and example files. + First public beta release. ================================================================================ = 1.0d12 last update: 2003-12-28 07:54:58 ================================================================================ - The [search] command now handles labelled and keyed values. One can - specify an empty label or key to search over all possible labels or keys - respectively. + The [search] command now handles labelled and keyed values. One can specify + an empty label or key to search over all possible labels or keys respectively. New [property type] command returning the type of a particular property. ================================================================================ |
|
From: <bde...@us...> - 2004-01-05 06:13:50
|
Update of /cvsroot/tcladdressbook/Help
In directory sc8-pr-cvs1:/tmp/cvs-serv9182/Help
Modified Files:
ReadMe
Log Message:
SF addresses
Index: ReadMe
===================================================================
RCS file: /cvsroot/tcladdressbook/Help/ReadMe,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ReadMe 9 Dec 2003 09:11:27 -0000 1.2
+++ ReadMe 5 Jan 2004 06:13:47 -0000 1.3
@@ -6,11 +6,11 @@
was introduced in this version of the System (Jaguar). This extension is
only useful on Macintosh platforms.
-The TclAddressBook1.0 folder should be installed on your system in
-/Library/Tcl or ~/Library/Tcl or any folder contained in your auto_path
-variable. If you use it with the AlphaX editor (version 8.0b11 or greater),
-you can also install it in the Tclextensions folder which is located at the
-same level as the application.
+The TclAddressBook1.0 folder should be installed on your system in
+/Library/Tcl or ~/Library/Tcl or any folder contained in your auto_path
+variable. If you use it from within the AlphaX editor (version 8.0b11 or
+greater), you can also install it in the Tclextensions folder which is
+located at the same level as the application.
Please read the documentation about the command in the Help file
TclAddressBookHelp.html
@@ -20,7 +20,7 @@
Please e-mail any bug or problem you encounter to Bernard Desgraupes
-e-mail <bde...@ea...> or <bde...@us...>
-Web page <http://webperso.easyconnect.fr/bdesgraupes/tcl.html>
+e-mail <bde...@us...>
+Web page <http://tcladdressbook.sourceforge.net/>
Last modification: $Date 2003-11-29 11:36:54$
|
|
From: <bde...@us...> - 2004-01-05 06:12:52
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv8989/Help Modified Files: TclAddressBookHelp.html Log Message: Code contribs Index: TclAddressBookHelp.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TclAddressBookHelp.html 5 Jan 2004 05:49:41 -0000 1.12 +++ TclAddressBookHelp.html 5 Jan 2004 06:12:49 -0000 1.13 @@ -43,8 +43,9 @@ <LI><A HREF="#M28">KNOW ISSUES</A> <LI><A HREF="#M29">LICENSE AND DISCLAIMER</A> <LI><A HREF="#M30">SOURCE CODE</A> -<LI><A HREF="#M31">SEE ALSO</A> -<LI><A HREF="#M32">KEYWORDS</A> +<LI><A HREF="#M31">CONTRIBUTIONS</A> +<LI><A HREF="#M32">SEE ALSO</A> +<LI><A HREF="#M33">KEYWORDS</A> </UL><P><P><H2><A NAME="M1"></A> NAME</H2> addressbook - manipulate the Macintosh OSX Address Book database<P><H2><A NAME="M2"></A> SYNOPSIS</H2> <PRE> @@ -252,10 +253,15 @@ page at <A HREF="http://webperso.easyconnect.fr/bdesgraupes/tcl.html">http://webperso.easyconnect.fr/bdesgraupes/tcl.html</A><P><P> The code is under CVS control. You can retrieve the latest stage of development using any CVS client. See instructions at: <A HREF="http://sourceforge.net/cvs/?group_id=96169">http://sourceforge.net/cvs/?group_id=96169</A><P><P> You can also browse the cvs repository online at -<A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook</A> <P><H2><A NAME="M31"></A> SEE ALSO</H2> +<A HREF="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook">http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook</A> <P><H2><A NAME="M31"></A> CONTRIBUTIONS</H2> +Code contributions (Tcl scripts making use of the Tcladdressbook extension) +are very welcome. There is a "Contribs" directory in the Tcladdressbook +project on SourceForge for code contributions. They must be free software, +distributed under an Open Source license acceptable by the SourceForge site +(for instance, the same licensing terms as the Tcl language itself).<P><H2><A NAME="M32"></A> SEE ALSO</H2> See the TclX extension for keyed lists. See the Mk4Tcl extension for -commands to open directly the database file.<P><H2><A NAME="M32"></A> KEYWORDS</H2> +commands to open directly the database file.<P><H2><A NAME="M33"></A> KEYWORDS</H2> Address book, data base.<P><HR> -<P> Last updated 2004-01-05 06:45:15<P> +<P> Last updated 2004-01-05 07:09:51<P> </BODY> </HTML> |
|
From: <bde...@us...> - 2004-01-05 06:12:45
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv8971/Help Modified Files: TclAddressBookHelp.aida Log Message: Code contribs Index: TclAddressBookHelp.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.aida,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- TclAddressBookHelp.aida 5 Jan 2004 05:43:54 -0000 1.9 +++ TclAddressBookHelp.aida 5 Jan 2004 06:12:42 -0000 1.10 @@ -318,6 +318,12 @@ ((nl You can also browse the cvs repository online at <http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook> +((s1 CONTRIBUTIONS +Code contributions (Tcl scripts making use of the Tcladdressbook extension) +are very welcome. There is a "Contribs" directory in the Tcladdressbook +project on SourceForge for code contributions. They must be free software, +distributed under an Open Source license acceptable by the SourceForge site +(for instance, the same licensing terms as the Tcl language itself). ((s1 SEE ALSO See the TclX extension for keyed lists. See the Mk4Tcl extension for |
|
From: <bde...@us...> - 2004-01-05 06:12:37
|
Update of /cvsroot/tcladdressbook/Help
In directory sc8-pr-cvs1:/tmp/cvs-serv8949/Help
Modified Files:
TclAddressBookHelp
Log Message:
Code contribs
Index: TclAddressBookHelp
===================================================================
RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- TclAddressBookHelp 5 Jan 2004 05:49:33 -0000 1.10
+++ TclAddressBookHelp 5 Jan 2004 06:12:34 -0000 1.11
@@ -43,8 +43,9 @@
8. KNOW ISSUES
9. LICENSE AND DISCLAIMER
10. SOURCE CODE
- 11. SEE ALSO
- 12. KEYWORDS
+ 11. CONTRIBUTIONS
+ 12. SEE ALSO
+ 13. KEYWORDS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
@@ -345,17 +346,23 @@
You can also browse the cvs repository online at
<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/tcladdressbook>
+11. CONTRIBUTIONS
+Code contributions (Tcl scripts making use of the Tcladdressbook extension)
+are very welcome. There is a "Contribs" directory in the Tcladdressbook
+project on SourceForge for code contributions. They must be free software,
+distributed under an Open Source license acceptable by the SourceForge site
+(for instance, the same licensing terms as the Tcl language itself).
-11. SEE ALSO
+12. SEE ALSO
See the TclX extension for keyed lists. See the Mk4Tcl extension for
commands to open directly the database file.
-12. KEYWORDS
+13. KEYWORDS
Address book, data base.
----------------------------------------------------------------------
- Last updated 2004-01-05 06:44:43
+ Last updated 2004-01-05 07:07:40
|
|
From: <bde...@us...> - 2004-01-05 05:49:45
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv5304/Help Modified Files: TclAddressBookHelp.html Log Message: Keyed lists ref Index: TclAddressBookHelp.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- TclAddressBookHelp.html 28 Dec 2003 07:48:21 -0000 1.11 +++ TclAddressBookHelp.html 5 Jan 2004 05:49:41 -0000 1.12 @@ -1,16 +1,16 @@ <HTML> <HEAD> -<TITLE>TcladdressbookHelp</TITLE> +<TITLE>Tcladdressbook Help</TITLE> <META NAME=GENERATOR CONTENT="Aida Mode"> </HEAD> <BODY> -<!-- :Title: TcladdressbookHelp --> +<!-- :Title: Tcladdressbook Help --> <!-- :Project: addressbook extension for Tcl --><P><!-- :Author: Bernard Desgraupes <A HREF="mailto:bde...@ea...">bde...@ea...</A> --> -<!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --><P><!-- :Modified: 2003-12-28 06:48:08 --><P><!-- :TclCmd: set currentversion [package require addressbook] --><P><!-- logo --> +<!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --><P><!-- :Modified: 2004-01-05 06:42:28 --><P><!-- :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> -This is a manual page for the Tcladdressbook extension for Tcl. This -documents version 1.0d12. +This is a manual page for the Tcladdressbook extension for Tcl. It +documents version 1.0b1. </I></P></BLOCKQUOTE><HR> <UL> <LI><A HREF="#M1">NAME</A> @@ -77,7 +77,7 @@ This command returns all the data available in the database concerning the logged-in user ("Me"). The returned value takes the form of a keyed list: see the <B>addressbook record</B> command for a description -of this format. Keyed lists can be very easily manipulated with the +of this format. Keyed lists can be easily manipulated with the <B>keylget</B> and <B>keylset</B> commands defined in the TclX extension.<P><H4><A NAME="M11"></A> addressbook groups ?-ids? ?-ingroup <I>groupID</I>?</H4> This command returns a list of all the existing group records: if no option is specified, it is a list whose elements are sublists made of two @@ -154,9 +154,9 @@ <P> Dates are returned as values suitable for use with the <B>clock format</B> Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". -<P> Note that keyed lists can be very easily manipulated -with the <B>keylget</B> and <B>keylset</B> commands defined in the TclX -extension. One can also use the usual Tcl commands concerning lists.<P><H4><A NAME="M21"></A> addressbook save</H4> +<P> Note that keyed lists can be easily manipulated +using the <B>keylget</B> and <B>keylset</B> commands defined in the TclX +extension.<P><H4><A NAME="M21"></A> addressbook save</H4> This command lets you save the changes made in the database. Commands such as <B>addressbook set</B>, <B>addressbook create</B> or <B>addressbook delete</B> modify the data in memory: to make the changes definitive in the @@ -244,7 +244,7 @@ Please e-mail any bug or problem you encounter: <A HREF="mailto:bde...@us...">bde...@us...</A><P><H2><A NAME="M29"></A> LICENSE AND DISCLAIMER</H2> This software is free software and distributed under the same licensing terms -as the Tcl language itself. See license.terms in the Tcl distribution.<P><P> © Copyright Bernard Desgraupes 2003<P><H2><A NAME="M30"></A> SOURCE CODE</H2> +as the Tcl language itself. See license.terms in the Tcl distribution.<P><P> © Copyright Bernard Desgraupes 2003-2004<P><H2><A NAME="M30"></A> SOURCE CODE</H2> Tcladdressbook is an Open Source Project. Its source code is public and can be found on the SourceForge site at the following address: <A HREF="http://sourceforge.net/projects/tcladdressbook">http://sourceforge.net/projects/tcladdressbook</A><P><P> Tcladdressbook binary releases are available at @@ -256,6 +256,6 @@ See the TclX extension for keyed lists. See the Mk4Tcl extension for commands to open directly the database file.<P><H2><A NAME="M32"></A> KEYWORDS</H2> Address book, data base.<P><HR> -<P> Last updated 2003-12-28 07:59:18<P> +<P> Last updated 2004-01-05 06:45:15<P> </BODY> </HTML> |
|
From: <bde...@us...> - 2004-01-05 05:49:36
|
Update of /cvsroot/tcladdressbook/Help
In directory sc8-pr-cvs1:/tmp/cvs-serv5272/Help
Modified Files:
TclAddressBookHelp
Log Message:
Keyed lists ref
Index: TclAddressBookHelp
===================================================================
RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- TclAddressBookHelp 28 Dec 2003 07:48:07 -0000 1.9
+++ TclAddressBookHelp 5 Jan 2004 05:49:33 -0000 1.10
@@ -1,6 +1,6 @@
-Title: TcladdressbookHelp
+Title: Tcladdressbook Help
Project: addressbook extension for Tcl
-Modified: 2003-12-28 06:48:08
+Modified: 2004-01-05 06:42:28
TclCmd: set currentversion [package require addressbook]
@@ -9,8 +9,8 @@
Abstract
-This is a manual page for the Tcladdressbook extension for Tcl. This
-documents version 1.0d12.
+This is a manual page for the Tcladdressbook extension for Tcl. It
+documents version 1.0b1.
1. NAME
@@ -103,7 +103,7 @@
This command returns all the data available in the database concerning
the logged-in user ("Me"). The returned value takes the form of
a keyed list: see the addressbook record command for a description
-of this format. Keyed lists can be very easily manipulated with the
+of this format. Keyed lists can be easily manipulated with the
keylget and keylset commands defined in the TclX extension.
addressbook groups ?-ids? ?-ingroup groupID?
@@ -201,9 +201,9 @@
Dates are returned as values suitable for use with the clock
format Tcl command. It is the number of seconds relative to "Thu Jan 01
00:00:00 CET 1970".
- Note that keyed lists can be very easily manipulated
-with the keylget and keylset commands defined in the TclX
-extension. One can also use the usual Tcl commands concerning lists.
+ Note that keyed lists can be easily manipulated
+using the keylget and keylset commands defined in the TclX
+extension.
addressbook save
This command lets you save the changes made in the database. Commands such
@@ -326,7 +326,7 @@
This software is free software and distributed under the same licensing terms
as the Tcl language itself. See license.terms in the Tcl distribution.
- © Copyright Bernard Desgraupes 2003
+ © Copyright Bernard Desgraupes 2003-2004
10. SOURCE CODE
@@ -355,7 +355,7 @@
----------------------------------------------------------------------
- Last updated 2003-12-28 08:01:30
+ Last updated 2004-01-05 06:44:43
|
|
From: <bde...@us...> - 2004-01-05 05:43:57
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv4508/Help Modified Files: TclAddressBookHelp.aida Log Message: Keyed lists Index: TclAddressBookHelp.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.aida,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- TclAddressBookHelp.aida 28 Dec 2003 07:48:14 -0000 1.8 +++ TclAddressBookHelp.aida 5 Jan 2004 05:43:54 -0000 1.9 @@ -1,11 +1,11 @@ -:Title: TcladdressbookHelp +:Title: Tcladdressbook Help :Project: addressbook extension for Tcl !! !! :Version: $Revision$ !! !! :CVSDate: $Date$ !! :Author: Bernard Desgraupes <bde...@ea...> !! :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> !! !! :Created: 2003-11-26 14:30:03 -:Modified: 2003-12-28 06:48:08 +:Modified: 2004-01-05 06:42:28 !! !! :Keywords: Address book, data base :TclCmd: set currentversion [package require addressbook] @@ -16,7 +16,7 @@ ((nl ((lk TclAB.html )) Home Page lk)) | ((lk http://sourceforge.net/projects/tcladdressbook )) Project Page at SourceForge lk)) ((/ -This is a manual page for the Tcladdressbook extension for Tcl. This +This is a manual page for the Tcladdressbook extension for Tcl. It documents version ((s $currentversion s)). /)) ((toc @@ -76,7 +76,7 @@ This command returns all the data available in the database concerning the logged-in user ("Me"). The returned value takes the form of a keyed list: see the ((b addressbook record b)) command for a description -of this format. Keyed lists can be very easily manipulated with the +of this format. Keyed lists can be easily manipulated with the ((b keylget b)) and ((b keylset b)) commands defined in the TclX extension. ((s3 addressbook groups ?-ids? ?-ingroup ((i groupID i))? @@ -174,9 +174,9 @@ ((nl Dates are returned as values suitable for use with the ((b clock format b)) Tcl command. It is the number of seconds relative to "Thu Jan 01 00:00:00 CET 1970". -((nl Note that keyed lists can be very easily manipulated -with the ((b keylget b)) and ((b keylset b)) commands defined in the TclX -extension. One can also use the usual Tcl commands concerning lists. +((nl Note that keyed lists can be easily manipulated +using the ((b keylget b)) and ((b keylset b)) commands defined in the TclX +extension. ((s3 addressbook save This command lets you save the changes made in the database. Commands such @@ -299,7 +299,7 @@ This software is free software and distributed under the same licensing terms as the Tcl language itself. See license.terms in the Tcl distribution. -((nl © Copyright Bernard Desgraupes 2003 +((nl © Copyright Bernard Desgraupes 2003-2004 ((s1 SOURCE CODE |
|
From: <bde...@us...> - 2004-01-05 05:38:35
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv3376/Help Modified Files: TclAB_QuickStart.tcl Log Message: Update syntax before beta Index: TclAB_QuickStart.tcl =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.tcl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TclAB_QuickStart.tcl 28 Dec 2003 07:47:23 -0000 1.3 +++ TclAB_QuickStart.tcl 5 Jan 2004 05:38:32 -0000 1.4 @@ -1,294 +1,320 @@ -# This file is a tutorial that demonstrates the [addressbook] command. -# For a detailed and complete description of the syntax of each subcommand, -# see the file TclAddressBookHelp (text format) or TclAddressBookHelp.html -# (to be viewed in a browser). -# -# Author: Bernard Desgraupes -# e-mail: <bde...@ea...> -# Web page of the Tcladdressbook extension: -# <http://sourceforge.net/projects/tcladdressbook> -# -# $Date$ -# $Revision$ +# This file is a tutorial that demonstrates the [addressbook] command +# defined by the Tcladdressbook extension for Tcl. It documents +# version ((s $currentversion s)). +# For a detailed and complete description of the syntax of each subcommand, +# refer to the help file <TclAddressBookHelp.html>. # Load the extension - package require addressbook +% package require addressbook -# Using the commands -# The [groups] command -# List the groups (name and ID) +# # Using the commands +# # The [groups] command +# List all the groups (ID and name) - addressbook groups +% addressbook groups -# List the groups (only ID) +# List all the groups (only ID) - addressbook groups -ids +% addressbook groups -ids -# List the subgroups of a specific group (name and ID) +# List the subgroups of a specific group (ID and name) - set groupid [lindex [addressbook groups -ids] 2] - addressbook groups -ingroup $groupid +% set groupid [lindex [addressbook groups -ids] 0] +% addressbook groups -ingroup $groupid # List the subgroups of a specific group (only ID) - addressbook groups -ids -ingroup $groupid +% addressbook groups -ids -ingroup $groupid -# The [persons] command -# List the person records (name and ID) +# # The [persons] command +# List all the persons records (ID and name) - addressbook persons +% addressbook persons -# List the person records (only ID) +# List all the persons records (only ID) - addressbook persons -ids +% addressbook persons -ids -# The [count] command -# Count the existing groups and person records +# # The [count] command +# Count the existing groups and persons records - addressbook count -groups - addressbook count -persons - addressbook count -persons -ingroup [lindex [addressbook groups -ids] 0] +% addressbook count -groups +% addressbook count -persons +% addressbook count -persons -ingroup [lindex [addressbook groups -ids] 0] -# The [getme] command +# # The [getme] command # Store the info about "me" in the variable myrecord. - set myrecord [addressbook getme] +% set myrecord [addressbook getme] # The value of myrecord is a keyed list. One can use the usual Tcl list -# commands or the special keylist commands defined in the TclX extension -# like this: - - keylkeys myrecord - keylget myrecord Email.work - keylget myrecord Address.home.ZIP - clock format [keylget myrecord Birthday] - +# commands to parse this value or special commands defined in the TclX +# extension (see section Using keyed lists below). -# The [record] command +# # The [record] command # Store the ID of the first record in the variable theid - set theid [lindex [addressbook persons -ids] 0] +% set theid [lindex [addressbook persons -ids] 0] -# Store the info about this record in the variable "person". The syntax is -# the same as with the [getme] command. +# Store the info about this record in the variable person. The +# returned value has the same keyed list format as with the [getme] command. - set person [addressbook record $theid] - keylkeys person - keylget person Email.work - keylget person Address.home.ZIP - clock format [keylget person Birthday] +% set person [addressbook record $theid] -# Store the ID of the first group in the variable theid +# Similarly with a group: store the ID of the first group in the variable theid - set theid [lindex [addressbook groups -ids] 0] +% set theid [lindex [addressbook groups -ids] 0] # Store the info about this group in the variable grp - set grp [addressbook record $theid] - keylkeys grp - keylget grp GroupName - clock format [keylget grp Modification] +% set grp [addressbook record $theid] -# The [type] command +# # The [type] command # Find the type (ABPerson or ABGroup) of the object corresponding # to the ID $theid - addressbook type $theid - - - -# The [property names] command -# Get the list of all existing properties for groups or persons - - addressbook property names -groups - addressbook property names -persons +% addressbook type $theid -# The [remove] command -# Remove the record corresponding to the ID $theid from the database +# # The [remove] command +# Remove from the database the record corresponding to the ID $theid - addressbook delete $theid +% addressbook delete $theid # Check that there were changes (1 if yes, 0 if no) - addressbook changed +% addressbook changed # Save the changes to make them permanent - addressbook save +% addressbook save -# Remove the record corresponding to the ID $theid from a specific group: +# Remove from a specific group the record corresponding to the ID $theid: # it is removed as member of this subgroup but will be removed from the # database only if it does not belong to other groups. - set groupid [lindex [addressbook groups -ids] 0] - set theid [lindex [addressbook persons -ids] 0] - addressbook delete $theid -fromgroup $groupid +% set groupid [lindex [addressbook groups -ids] 0] +% set theid [lindex [addressbook persons -ids] 0] +% addressbook delete $theid -fromgroup $groupid -# The [parents] command +# # The [parents] command # List the parents of a person record (the various groups it belongs to). -# One can also find the parents of a group with this command. - set theid [lindex [addressbook persons -ids] 0] - addressbook parents $theid +% set theid [lindex [addressbook persons -ids] 0] +% addressbook parents $theid # List the parents of a person record (only ID) - addressbook parents -ids $theid +% addressbook parents -ids $theid +# One can also find the parents of a group using this command. -# The [create] command - (group|person) +# # The [create] command -# The [property type] command -# Get the name of a particular property - addressbook property type -groups UID - addressbook property type -persons Address +# # The [property names] command +# Get the list of all existing properties for groups or for persons +% addressbook property names -groups +% addressbook property names -persons -# The [property add] command -# Add a new property of type String called Instrument - addressbook property add -persons Instrument String +# # The [property type] command +# Get the type of a particular property -# Add a new property of type Date called Meeting +% addressbook property type -groups UID +% addressbook property type -persons Address - addressbook property add -groups Meeting Date +# For the two examples above, the result is respectively +# String and MultiDictionary. +# # The [property add] command +# Add a new person's property called Instrument with type String -# The [property remove] command -# Remove the properties created above +% addressbook property add -persons Instrument String - addressbook property remove -persons Instrument - addressbook property remove -groups Meeting +# Add a new group's property called Meeting with type Date +% addressbook property add -groups Meeting Date -# The [export] command -# Create a VCard corresponding to a particular record. - set theid [lindex [addressbook persons -ids] 0] +# # The [property remove] command +# Remove the properties created above: -# The data returned is binary. You can store it in a file. +% addressbook property remove -persons Instrument +% addressbook property remove -groups Meeting - set vcardData [addressbook export $theid] +# # The [export] command +# Create a VCard corresponding to a particular record: -# The [import] command +% set theid [lindex [addressbook persons -ids] 0] +% set vcardData [addressbook export $theid] - set fname [file join /Users bernardo someVcard.vcf] - set fid [open $fname r] - set vcard [read $fid] - close $fid - addressbook import $vcard +# The data returned is binary. You can store it in a file for instance. +# # The [import] command +# Import in the database some information stored in a .vcf file. A new +# record containing this info, is created in the database: -# The [image] command +% set fname [file join /Users bernardo someVcard.vcf] +% set fid [open $fname r] +% set vcard [read $fid] +% close $fid +% addressbook import $vcard - set theid [lindex [addressbook persons -ids] 0] - set img [addressbook image $theid] +# # The [image] command +# Get the custom image corresponding to a particular record: -# The [set] command +% set theid [lindex [addressbook persons -ids] 0] +% set img [addressbook image $theid] - set theid [lindex [addressbook persons -ids] 0] - addressbook set $theid First +# The data returned is binary. You can store it in a file for instance. +# An error is raised if there is no custom image for this record. +# # The [set] command +# This command lets you get or set the value of a particular field. For +# instance, to get the first name, dates and address fields of the first record: +% set theid [lindex [addressbook persons -ids] 0] +% addressbook set $theid First +% addressbook set $theid ABDate +% addressbook set $theid Address - addressbook set $theid First Georgios - addressbook changed - addressbook save +# To change the first name of the first record: +% addressbook set $theid First Georgios +% addressbook changed +% addressbook save +# Note that the addressbook save command must be invoked to make the changes +# permanent. +# # When setting the value of a field it is important that the new value +# be formatted correctly with respect to the type of the property, as explained +# in the help file <TclAddressBookHelp.html>. Here are a few +# examples corresponding to various property types: - addressbook set $theid First Johann-Sebastian +# Multi string value -# Multi string value - addressbook set $theid Email {{Work wo...@ha...} {Concerts DD...@su...}} - addressbook set $theid Email {{Work op...@or...} {Concerts BW...@CA...}} +% addressbook set $theid Email {{Work BW...@ha...} {Concerts op...@so...}} + +# Date value -# Date value - addressbook set $theid Birthday [clock scan "1 Apr 1985"] +% addressbook set $theid Birthday [clock scan "1 Apr 1985"] -# Multi date value - addressbook set $theid ABDate - addressbook set $theid ABDate [list [list "birthday Franny" 621597600] [list "birthday Zooey" 816692400]] +# Multi date value +% addressbook set $theid ABDate [list [list "birthday Franny" 621597600] [list "birthday Zooey" 816692400]] -# Multi dictionary value - addressbook set $theid Address - addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}] ] ] +# Multi dictionary value +% addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}]]] -# The [search] command - addressbook search -persons -ids -nocase Last == "Bach" - addressbook search -persons -ids -nocase Last > "Ba" +# # The [search] command +# This command can be used to report the IDs of the records corresponding to +# a single criterion. The criterion is expressed by a three elements list: +# the first element is the name of a property, the second is a comparison operator and +# the third is the value to search for. Refer to the help file for a complete +# description of the possible comparison operators. A few options are available +# (-persons, -ids and -nocase). Here are a few simple examples: - addressbook search -persons -nocase Modification >= 1070199949 - addressbook search -persons -nocase Modification < 1070199949 +% addressbook search Last == "Bach" +% addressbook search -persons -ids -nocase Last > "Ba" +% addressbook search -persons Modification >= 1070199949 +% addressbook search -persons Modification < 1070199949 -# Multi string value. It searches one value at a time. - addressbook search -persons Phone == {Work "01 02 03 04 05"} +# # When searching on a particular property, it is important that the +# searched value be formatted correctly with respect to the type of the property, +# as explained in the help file <TclAddressBookHelp.html>. Specify +# an empty label or an empty key to search on all possible labels or keys +# respectively. Here are a few examples corresponding to various property types: -# Empty label --> to search on all phones - addressbook search -persons Phone >= {"" "01 02 03 04 05"} +# Multi string value. This instruction searches one value at a time. +% addressbook search -persons Phone == {Work "01 02 03 04 05"} -# Multi dict value. It searches one key in one dictionary at a time. - addressbook search -persons -nocase Address == {Home {ZIP 98765}} - addressbook search -persons -nocase Address >= {Home {ZIP 98}} +# Empty label to search on all phone numbers -# Empty label --> to search on all labels - addressbook search -persons -nocase Address >= {"" {City Paris}} +% addressbook search -persons Phone >= {"" "01 02 03 04 05"} -# Empty key --> to search on all keys - addressbook search -persons -nocase Address >= {home {"" abc}} +# Multi dictionary value. This instruction searches one key +# in one dictionary at a time. -# Empty label and key --> to search on all labels and keys - addressbook search -persons -nocase Address >= {"" {"" abc}} +% addressbook search -persons -nocase Address == {Home {ZIP 98765}} +% addressbook search -persons -nocase Address >= {Home {ZIP 98}} +# Empty label to search on all labels +% addressbook search -persons -nocase Address >= {"" {City Paris}} -# Using keyed lists +# Empty key to search on all keys - package require tclx +% addressbook search -persons -nocase Address >= {home {"" abc}} +# Empty label and key to search on all labels and keys -# ---------------------------------------------------------------------- -# Last updated 2003-12-28 08:36:25 +% addressbook search -persons -nocase Address >= {"" {"" abc}} + + + +# # Using keyed lists +# Keyed lists can be easily manipulated using the keylget and +# keylset commands defined by the TclX extension. For instance, if a +# record has been stored in some variable myrecord, one can extract +# various fields like this: + +% package require tclx +% keylkeys myrecord +% keylget myrecord Email.work +% keylget myrecord Address.home.ZIP +% clock format [keylget myrecord Birthday] + +# Similarly, with a group, one can invoke: + +% set theid [lindex [addressbook groups -ids] 0] +% set grp [addressbook record $theid] +% keylkeys grp +% keylget grp GroupName +% clock format [keylget grp Modification] + + + + +# # ---------------------------------------------------------------------- +# # Last updated ((s [ISOTime::ISODateAndTimeRelaxed] s)) |
|
From: <bde...@us...> - 2004-01-05 05:38:28
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv3346/Help Modified Files: TclAB_QuickStart.html Log Message: Update syntax before beta Index: TclAB_QuickStart.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TclAB_QuickStart.html 28 Dec 2003 07:47:18 -0000 1.3 +++ TclAB_QuickStart.html 5 Jan 2004 05:38:25 -0000 1.4 @@ -12,14 +12,14 @@ <!-- :Author: Bernard Desgraupes <A HREF="mailto:bde...@ea...">bde...@ea...</A> --> <!-- :Homepage: <A HREF="http://webperso.easyconnect.fr/bdesgraupes/">http://webperso.easyconnect.fr/bdesgraupes/</A> --> <!-- :Created: 2003-12-14 18:26:47 --> -<!-- :Modified: 2003-12-16 11:47:23 --> +<!-- :Modified: 2004-01-04 21:10:51 --> <!-- :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> This file is a tutorial that demonstrates the [addressbook] command -defined by the Tcladdressbook extension for Tcl. It -documents version 1.0d12. +defined by the Tcladdressbook extension for Tcl. It documents +version 1.0d12. 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> @@ -31,10 +31,10 @@ <UL><LI><A HREF="#M5">The [getme] command</A></UL> <UL><LI><A HREF="#M6">The [record] command</A></UL> <UL><LI><A HREF="#M7">The [type] command</A></UL> -<UL><LI><A HREF="#M8">The [property names] command</A></UL> -<UL><LI><A HREF="#M9">The [remove] command</A></UL> -<UL><LI><A HREF="#M10">The [parents] command</A></UL> -<UL><LI><A HREF="#M11">The [create] command</A></UL> +<UL><LI><A HREF="#M8">The [remove] command</A></UL> +<UL><LI><A HREF="#M9">The [parents] command</A></UL> +<UL><LI><A HREF="#M10">The [create] command</A></UL> +<UL><LI><A HREF="#M11">The [property names] command</A></UL> <UL><LI><A HREF="#M12">The [property type] command</A></UL> <UL><LI><A HREF="#M13">The [property add] command</A></UL> <UL><LI><A HREF="#M14">The [property remove] command</A></UL> @@ -49,15 +49,15 @@ package require addressbook </PRE><P><H2><A NAME="M1"></A> Using the commands</H2> <H3><A NAME="M2"></A> The [groups] command</H3> -List the groups (name and ID) +List all the groups (ID and name) <PRE> addressbook groups </PRE> -List the groups (only ID) +List all the groups (only ID) <PRE> addressbook groups -ids </PRE> -List the subgroups of a specific group (name and ID) +List the subgroups of a specific group (ID and name) <PRE> set groupid [lindex [addressbook groups -ids] 2] addressbook groups -ingroup $groupid @@ -66,68 +66,49 @@ <PRE> addressbook groups -ids -ingroup $groupid </PRE><P><H3><A NAME="M3"></A> The [persons] command</H3> -List the person records (name and ID) +List all the persons records (ID and name) <PRE> addressbook persons </PRE> -List the person records (only ID) +List all the persons records (only ID) <PRE> addressbook persons -ids </PRE><P><H3><A NAME="M4"></A> The [count] command</H3> -Count the existing groups and person records +Count the existing groups and persons records <PRE> addressbook count -groups addressbook count -persons addressbook count -persons -ingroup [lindex [addressbook groups -ids] 0] </PRE><P><H3><A NAME="M5"></A> The [getme] command</H3> -Store the info about "me" in the variable myrecord. +Store the info about "me" in the variable <I>myrecord</I>. <PRE> set myrecord [addressbook getme] </PRE> -The value of myrecord is a keyed list. One can use the usual Tcl list -commands or the special keylist commands defined in the TclX extension -like this: -<PRE> - keylkeys myrecord - keylget myrecord Email.work - keylget myrecord Address.home.ZIP - clock format [keylget myrecord Birthday] -</PRE><P><H3><A NAME="M6"></A> The [record] command</H3> -Store the ID of the first record in the variable theid +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> +Store the ID of the first record in the variable <I>theid</I> <PRE> set theid [lindex [addressbook persons -ids] 0] </PRE> -Store the info about this record in the variable "person". The syntax is -the same as with the [getme] command. +Store the info about this record in the variable <I>person</I>. The +returned value has the same keyed list format as with the [getme] command. <PRE> set person [addressbook record $theid] - keylkeys person - keylget person Email.work - keylget person Address.home.ZIP - clock format [keylget person Birthday] -</PRE><P>Store the ID of the first group in the variable theid +</PRE><P>Similarly with a group: store the ID of the first group in the variable <I>theid</I> <PRE> set theid [lindex [addressbook groups -ids] 0] </PRE> -Store the info about this group in the variable grp and display the - results with the [parray] command +Store the info about this group in the variable <I>grp</I> <PRE> set grp [addressbook record $theid] - keylkeys grp - keylget grp GroupName - clock format [keylget grp Modification] </PRE><P><H3><A NAME="M7"></A> The [type] command</H3> -Find the type (ABPerson or ABGroup) of the object corresponding -to the ID $theid +Find the type (<I>ABPerson</I> or <I>ABGroup</I>) of the object corresponding +to the ID <I>$theid</I> <PRE> addressbook type $theid -</PRE><P><H3><A NAME="M8"></A> The [property names] command</H3> -Get the list of all existing properties for groups or persons -<PRE> - addressbook property names -groups - addressbook property names -persons -</PRE><P><H3><A NAME="M9"></A> The [remove] command</H3> -Remove the record corresponding to the ID $theid from the database +</PRE><P><H3><A NAME="M8"></A> The [remove] command</H3> +Remove from the database the record corresponding to the ID <I>$theid</I> <PRE> addressbook delete $theid </PRE> @@ -138,16 +119,15 @@ Save the changes to make them permanent <PRE> addressbook save -</PRE><P>Remove the record corresponding to the ID $theid from a specific group: +</PRE><P>Remove from a specific group the record corresponding to the ID <I>$theid</I>: it is removed as member of this subgroup but will be removed from the database only if it does not belong to other groups. <PRE> set groupid [lindex [addressbook groups -ids] 0] set theid [lindex [addressbook persons -ids] 0] addressbook delete $theid -fromgroup $groupid -</PRE><P><H3><A NAME="M10"></A> The [parents] command</H3> +</PRE><P><H3><A NAME="M9"></A> The [parents] command</H3> List the parents of a person record (the various groups it belongs to). -One can also find the parents of a group with this command. <PRE> set theid [lindex [addressbook persons -ids] 0] addressbook parents $theid @@ -155,33 +135,40 @@ List the parents of a person record (only ID) <PRE> addressbook parents -ids $theid -</PRE><P><H3><A NAME="M11"></A> The [create] command</H3> - (group|person)<P><H3><A NAME="M12"></A> The [property type] command</H3> -Get the name of a particular property +</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> +Get the list of all existing properties for groups or for persons +<PRE> + addressbook property names -groups + addressbook property names -persons +</PRE><P><H3><A NAME="M12"></A> The [property type] command</H3> +Get the type of a particular property <PRE> addressbook property type -groups UID addressbook property type -persons Address -</PRE><P><H3><A NAME="M13"></A> The [property add] command</H3> -Add a new property of type String called Instrument +</PRE> +For the two examples above, the result is respectively +<I>String</I> and <I>MultiDictionary</I>.<P><H3><A NAME="M13"></A> The [property add] command</H3> +Add a new person's property called <I>Instrument</I> with type <I>String</I> <PRE> addressbook property add -persons Instrument String -</PRE><P>Add a new property of type Date called Meeting +</PRE><P>Add a new group's property called <I>Meeting</I> with type <I>Date</I> <PRE> addressbook property add -groups Meeting Date </PRE><P><H3><A NAME="M14"></A> The [property remove] command</H3> -Remove the properties created above +Remove the properties created above: <PRE> addressbook property remove -persons Instrument addressbook property remove -groups Meeting </PRE><P><H3><A NAME="M15"></A> The [export] command</H3> -Create a VCard corresponding to a particular record. +Create a VCard corresponding to a particular record: <PRE> set theid [lindex [addressbook persons -ids] 0] -</PRE> -The data returned is binary. You can store it in a file. -<PRE> set vcardData [addressbook export $theid] -</PRE><P><H3><A NAME="M16"></A> The [import] command</H3> +</PRE> +The data returned is binary. You can store it in a file for instance.<P><H3><A NAME="M16"></A> The [import] command</H3> +Import in the database some information stored in a .vcf file. A new +record containing this info, is created in the database: <PRE> set fname [file join /Users bernardo someVcard.vcf] set fid [open $fname r] @@ -189,69 +176,110 @@ close $fid addressbook import $vcard </PRE><P><H3><A NAME="M17"></A> The [image] command</H3> +Get the custom image corresponding to a particular record: <PRE> set theid [lindex [addressbook persons -ids] 0] set img [addressbook image $theid] -</PRE><P><H3><A NAME="M18"></A> The [set] command</H3> +</PRE> +The data returned is binary. You can store it in a file for instance. +An error is raised if there is no custom image for this record.<P><H3><A NAME="M18"></A> The [set] command</H3> +This command lets you get or set the value of a particular field. For +instance, to get the first name, dates and address fields of the first record: <PRE> set theid [lindex [addressbook persons -ids] 0] addressbook set $theid First -</PRE><P><PRE> + addressbook set $theid ABDate + addressbook set $theid Address +</PRE> +To change the first name of the first record: +<PRE> addressbook set $theid First Georgios addressbook changed addressbook save -</PRE><P><PRE> - addressbook set $theid First Johann-Sebastian </PRE> -<!-- Multi string value --> +Note that the <B>addressbook save</B> command must be invoked to make the changes +permanent. +<P> When setting the value of a field it is important that the new value +be formatted correctly with respect to the type of the property, as explained +in the <A href="TclAddressBookHelp.html">help file</A>. Here are a few +examples corresponding to various property types: +<UL> + <LI> Multi string value <PRE> - addressbook set $theid Email {{Work wo...@ha...} {Concerts DD...@su...}} - addressbook set $theid Email {{Work op...@or...} {Concerts BW...@CA...}} -</PRE><P><!-- Date value --> + addressbook set $theid Email {{Work BW...@ha...} {Concerts op...@so...}} +</PRE> + + <LI> Date value <PRE> addressbook set $theid Birthday [clock scan "1 Apr 1985"] -</PRE><P><!-- Multi date value --> +</PRE><P> <LI> Multi date value <PRE> - addressbook set $theid ABDate addressbook set $theid ABDate [list [list "birthday Franny" 621597600] [list "birthday Zooey" 816692400]] -</PRE><P><!-- Multi dictionary value --> -<PRE> - addressbook set $theid Address - addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}] ] ] -</PRE><P><H3><A NAME="M19"></A> The [search] command</H3> +</PRE><P> <LI> Multi dictionary value <PRE> - addressbook search -persons -ids -nocase Last == "Bach" + addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}]]] +</PRE><P></UL><P><H3><A NAME="M19"></A> The [search] command</H3> +This command can be used to report the IDs of the records corresponding to +a single criterion. The criterion is expressed by a three elements list: +the first element is the name of a property, the second is a comparison operator and +the third is the value to search for. Refer to the help file for a complete +description of the possible comparison operators. A few options are available +(-persons, -ids and -nocase). Here are a few simple examples:<P><PRE> + addressbook search Last == "Bach" addressbook search -persons -ids -nocase Last > "Ba" -</PRE><P><PRE> - addressbook search -persons -nocase Modification >= 1070199949 - addressbook search -persons -nocase Modification < 1070199949 -</PRE><P><!-- Multi string value. It searches one value at a time. --> + addressbook search -persons Modification >= 1070199949 + addressbook search -persons Modification < 1070199949 +</PRE><P><P> When searching on a particular property, it is important that the +searched value be formatted correctly with respect to the type of the property, +as explained in the <A href="TclAddressBookHelp.html">help file</A>. Specify +an empty label or an empty key to search on all possible labels or keys +respectively. Here are a few examples corresponding to various property types: +<UL> + <LI> Multi string value. This instruction searches one value at a time. <PRE> addressbook search -persons Phone == {Work "01 02 03 04 05"} </PRE> -<!-- Empty label --> to search on all phones --> + <LI> Empty label to search on all phone numbers <PRE> addressbook search -persons Phone >= {"" "01 02 03 04 05"} -</PRE><P><!-- Multi dict value. It searches one key in one dictionary at a time. --> +</PRE> + <LI> Multi dictionary value. This instruction searches one key +in one dictionary at a time. <PRE> addressbook search -persons -nocase Address == {Home {ZIP 98765}} addressbook search -persons -nocase Address >= {Home {ZIP 98}} </PRE> -<!-- Empty label --> to search on all labels --> + <LI> Empty label to search on all labels <PRE> addressbook search -persons -nocase Address >= {"" {City Paris}} </PRE> -<!-- Empty key --> to search on all keys --> + <LI> Empty key to search on all keys <PRE> addressbook search -persons -nocase Address >= {home {"" abc}} </PRE> -<!-- Empty label and key --> to search on all labels and keys --> + <LI> Empty label and key to search on all labels and keys <PRE> addressbook search -persons -nocase Address >= {"" {"" abc}} -</PRE><P><H2><A NAME="M20"></A> Using keyed lists</H2> +</PRE><P></UL><P><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 +various fields like this: <PRE> package require tclx + keylkeys myrecord + keylget myrecord Email.work + keylget myrecord Address.home.ZIP + clock format [keylget myrecord Birthday] +</PRE> +Similarly, with a group, one can invoke: +<PRE> + set theid [lindex [addressbook groups -ids] 0] + set grp [addressbook record $theid] + keylkeys grp + keylget grp GroupName + clock format [keylget grp Modification] </PRE><P><HR> -<P> Last updated 2003-12-28 08:21:01<P> +<P> Last updated 2004-01-04 21:19:33<P> </BODY> </HTML> |
|
From: <bde...@us...> - 2004-01-05 05:38:24
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1:/tmp/cvs-serv3159/Help Modified Files: TclAB_QuickStart.aida Log Message: Update syntax before beta Index: TclAB_QuickStart.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.aida,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TclAB_QuickStart.aida 28 Dec 2003 07:47:12 -0000 1.3 +++ TclAB_QuickStart.aida 5 Jan 2004 05:37:43 -0000 1.4 @@ -6,7 +6,7 @@ !! :Author: Bernard Desgraupes <bde...@ea...> !! :Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> !! :Created: 2003-12-14 18:26:47 -:Modified: 2003-12-16 11:47:23 +:Modified: 2004-01-04 21:10:51 !! :Keywords: Address book, data base :TclCmd: set currentversion [package require addressbook] @@ -14,13 +14,13 @@ !! logo ((im Images/TclAB_logo.gif TclAB Logo im)) -((nl ((lk TclAB.html )) Home Page lk)) | ((lk http://sourceforge.net/projects/tcladdressbook )) Project Page at SourceForge lk)) +((nl ((lk TclAB.html ))Home Page lk)) | ((lk http://sourceforge.net/projects/tcladdressbook )) Project Page at SourceForge lk)) ((/ This file is a tutorial that demonstrates the [addressbook] command -defined by the Tcladdressbook extension for Tcl. It -documents version ((s $currentversion s)). +defined by the Tcladdressbook extension for Tcl. It documents +version ((s $currentversion s)). For a detailed and complete description of the syntax of each subcommand, refer to the ((lk TclAddressBookHelp.html ))help file lk)). /)) @@ -34,17 +34,17 @@ ((s1 Using the commands ((s2 The [groups] command -List the groups (name and ID) +List all the groups (ID and name) ((| addressbook groups |)) -List the groups (only ID) +List all the groups (only ID) ((| addressbook groups -ids |)) -List the subgroups of a specific group (name and ID) +List the subgroups of a specific group (ID and name) ((| - set groupid [lindex [addressbook groups -ids] 2] + set groupid [lindex [addressbook groups -ids] 0] addressbook groups -ingroup $groupid |)) List the subgroups of a specific group (only ID) @@ -54,18 +54,18 @@ ((s2 The [persons] command -List the person records (name and ID) +List all the persons records (ID and name) ((| addressbook persons |)) -List the person records (only ID) +List all the persons records (only ID) ((| addressbook persons -ids |)) ((s2 The [count] command -Count the existing groups and person records +Count the existing groups and persons records ((| addressbook count -groups addressbook count -persons @@ -74,69 +74,47 @@ ((s2 The [getme] command -Store the info about "me" in the variable myrecord. +Store the info about "me" in the variable ((i myrecord i)). ((| set myrecord [addressbook getme] |)) -The value of myrecord is a keyed list. One can use the usual Tcl list -commands or the special keylist commands defined in the TclX extension -like this: -((| - keylkeys myrecord - keylget myrecord Email.work - keylget myrecord Address.home.ZIP - clock format [keylget myrecord Birthday] -|)) +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). ((s2 The [record] command -Store the ID of the first record in the variable theid +Store the ID of the first record in the variable ((i theid i)) ((| set theid [lindex [addressbook persons -ids] 0] |)) -Store the info about this record in the variable "person". The syntax is -the same as with the [getme] command. +Store the info about this record in the variable ((i person i)). The +returned value has the same keyed list format as with the [getme] command. ((| set person [addressbook record $theid] - keylkeys person - keylget person Email.work - keylget person Address.home.ZIP - clock format [keylget person Birthday] |)) -Store the ID of the first group in the variable theid +Similarly with a group: store the ID of the first group in the variable ((i theid i)) ((| set theid [lindex [addressbook groups -ids] 0] |)) -Store the info about this group in the variable grp and display the - results with the [parray] command +Store the info about this group in the variable ((i grp i)) ((| set grp [addressbook record $theid] - keylkeys grp - keylget grp GroupName - clock format [keylget grp Modification] |)) ((s2 The [type] command -Find the type (ABPerson or ABGroup) of the object corresponding -to the ID $theid +Find the type (((i ABPerson i)) or ((i ABGroup i))) of the object corresponding +to the ID ((i $theid i)) ((| addressbook type $theid |)) -((s2 The [property names] command -Get the list of all existing properties for groups or persons -((| - addressbook property names -groups - addressbook property names -persons -|)) - - ((s2 The [remove] command -Remove the record corresponding to the ID $theid from the database +Remove from the database the record corresponding to the ID ((i $theid i)) ((| addressbook delete $theid |)) @@ -149,7 +127,7 @@ addressbook save |)) -Remove the record corresponding to the ID $theid from a specific group: +Remove from a specific group the record corresponding to the ID ((i $theid i)): it is removed as member of this subgroup but will be removed from the database only if it does not belong to other groups. ((| @@ -161,7 +139,6 @@ ((s2 The [parents] command List the parents of a person record (the various groups it belongs to). -One can also find the parents of a group with this command. ((| set theid [lindex [addressbook persons -ids] 0] addressbook parents $theid @@ -171,30 +148,41 @@ addressbook parents -ids $theid |)) +One can also find the parents of a group using this command. ((s2 The [create] command (group|person) +((s2 The [property names] command +Get the list of all existing properties for groups or for persons +((| + addressbook property names -groups + addressbook property names -persons +|)) + + ((s2 The [property type] command -Get the name of a particular property +Get the type of a particular property ((| addressbook property type -groups UID addressbook property type -persons Address |)) +For the two examples above, the result is respectively +((i String i)) and ((i MultiDictionary i)). ((s2 The [property add] command -Add a new property of type String called Instrument +Add a new person's property called ((i Instrument i)) with type ((i String i)) ((| addressbook property add -persons Instrument String |)) -Add a new property of type Date called Meeting +Add a new group's property called ((i Meeting i)) with type ((i Date i)) ((| addressbook property add -groups Meeting Date |)) ((s2 The [property remove] command -Remove the properties created above +Remove the properties created above: ((| addressbook property remove -persons Instrument addressbook property remove -groups Meeting @@ -202,17 +190,17 @@ ((s2 The [export] command -Create a VCard corresponding to a particular record. +Create a VCard corresponding to a particular record: ((| set theid [lindex [addressbook persons -ids] 0] -|)) -The data returned is binary. You can store it in a file. -((| set vcardData [addressbook export $theid] |)) +The data returned is binary. You can store it in a file for instance. ((s2 The [import] command +Import in the database some information stored in a .vcf file. A new +record containing this info, is created in the database: ((| set fname [file join /Users bernardo someVcard.vcf] set fid [open $fname r] @@ -223,95 +211,131 @@ ((s2 The [image] command +Get the custom image corresponding to a particular record: ((| set theid [lindex [addressbook persons -ids] 0] set img [addressbook image $theid] |)) - +The data returned is binary. You can store it in a file for instance. +An error is raised if there is no custom image for this record. ((s2 The [set] command +This command lets you get or set the value of a particular field. For +instance, to get the first name, dates and address fields of the first record: ((| set theid [lindex [addressbook persons -ids] 0] addressbook set $theid First + addressbook set $theid ABDate + addressbook set $theid Address |)) - +To change the first name of the first record: ((| addressbook set $theid First Georgios addressbook changed addressbook save |)) - -((| - addressbook set $theid First Johann-Sebastian -|)) -!! Multi string value +Note that the ((b addressbook save b)) command must be invoked to make the changes +permanent. +((nl When setting the value of a field it is important that the new value +be formatted correctly with respect to the type of the property, as explained +in the ((lk TclAddressBookHelp.html ))help file lk)). Here are a few +examples corresponding to various property types: +((lu +((li Multi string value ((| - addressbook set $theid Email {{Work wo...@ha...} {Concerts DD...@su...}} - addressbook set $theid Email {{Work op...@or...} {Concerts BW...@CA...}} + addressbook set $theid Email {{Work BW...@ha...} {Concerts op...@so...}} |)) - -!! Date value + +((li Date value ((| addressbook set $theid Birthday [clock scan "1 Apr 1985"] |)) -!! Multi date value +((li Multi date value ((| - addressbook set $theid ABDate addressbook set $theid ABDate [list [list "birthday Franny" 621597600] [list "birthday Zooey" 816692400]] |)) - -!! Multi dictionary value +((li Multi dictionary value ((| - addressbook set $theid Address - addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}] ] ] + addressbook set $theid Address [list [list Home [list {CountryCode fr} {City Paris} {Country France} {ZIP 75001} {Street "1, avenue de l'Opéra"}]]] |)) +lu)) ((s2 The [search] command -((| - addressbook search -persons -ids -nocase Last == "Bach" - addressbook search -persons -ids -nocase Last > "Ba" -|)) +This command can be used to report the IDs of the records corresponding to +a single criterion. The criterion is expressed by a three elements list: +the first element is the name of a property, the second is a comparison operator and +the third is the value to search for. Refer to the help file for a complete +description of the possible comparison operators. A few options are available +(-persons, -ids and -nocase). Here are a few simple examples: ((| - addressbook search -persons -nocase Modification >= 1070199949 - addressbook search -persons -nocase Modification < 1070199949 + addressbook search Last == "Bach" + addressbook search -persons -ids -nocase Last > "Ba" + addressbook search -persons Modification >= 1070199949 + addressbook search -persons Modification < 1070199949 |)) -!! Multi string value. It searches one value at a time. +((nl When searching on a particular property, it is important that the +searched value be formatted correctly with respect to the type of the property, +as explained in the ((lk TclAddressBookHelp.html ))help file lk)). Specify +an empty label or an empty key to search on all possible labels or keys +respectively. Here are a few examples corresponding to various property types: +((lu +((li Multi string value. This instruction searches one value at a time. ((| addressbook search -persons Phone == {Work "01 02 03 04 05"} |)) -!! Empty label --> to search on all phones +((li Empty label to search on all phone numbers ((| addressbook search -persons Phone >= {"" "01 02 03 04 05"} |)) - -!! Multi dict value. It searches one key in one dictionary at a time. +((li Multi dictionary value. This instruction searches one key +in one dictionary at a time. ((| addressbook search -persons -nocase Address == {Home {ZIP 98765}} addressbook search -persons -nocase Address >= {Home {ZIP 98}} |)) -!! Empty label --> to search on all labels +((li Empty label to search on all labels ((| addressbook search -persons -nocase Address >= {"" {City Paris}} |)) -!! Empty key --> to search on all keys +((li Empty key to search on all keys ((| addressbook search -persons -nocase Address >= {home {"" abc}} |)) -!! Empty label and key --> to search on all labels and keys +((li Empty label and key to search on all labels and keys ((| addressbook search -persons -nocase Address >= {"" {"" abc}} |)) +lu)) + ((s1 Using keyed lists +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 +various fields like this: ((| package require tclx + keylkeys myrecord + keylget myrecord Email.work + keylget myrecord Address.home.ZIP + clock format [keylget myrecord Birthday] +|)) +Similarly, with a group, one can invoke: +((| + set theid [lindex [addressbook groups -ids] 0] + set grp [addressbook record $theid] + keylkeys grp + keylget grp GroupName + clock format [keylget grp Modification] |)) + + ((- ((nl Last updated ((s [ISOTime::ISODateAndTimeRelaxed] s)) |
|
From: <bde...@us...> - 2004-01-05 05:36:08
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1:/tmp/cvs-serv2951/Source Modified Files: TclAddressBook_version.h Log Message: Going beta Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- TclAddressBook_version.h 28 Dec 2003 07:48:46 -0000 1.6 +++ TclAddressBook_version.h 5 Jan 2004 05:36:04 -0000 1.7 @@ -1,13 +1,13 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2003-12-16 11:34:35 +// Last modification: 2004-01-05 06:27:41 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook #define TCLADDRESSBOOK_MAJOR 1 #define TCLADDRESSBOOK_MINOR 0 -#define TCLADDRESSBOOK_SUBMINOR 12 -#define TCLADDRESSBOOK_STAGE 'd' +#define TCLADDRESSBOOK_SUBMINOR 1 +#define TCLADDRESSBOOK_STAGE 'b' // 'd' for developStage // 'a' for alphaStage // 'b' for betaStage |
|
From: <bde...@us...> - 2004-01-05 05:35:53
|
Update of /cvsroot/tcladdressbook/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv2893/Source
Modified Files:
TclAddressBook.c
Log Message:
Version numbering (final/non final)
Index: TclAddressBook.c
===================================================================
RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- TclAddressBook.c 28 Dec 2003 07:50:26 -0000 1.23
+++ TclAddressBook.c 5 Jan 2004 05:35:50 -0000 1.24
@@ -85,16 +85,25 @@
Tcl_CreateObjCommand(interp, "addressbook", TclABCmd_AddressBook,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
- sprintf(vstr,"%d.%d%c%d\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR,
- TCLADDRESSBOOK_STAGE, TCLADDRESSBOOK_SUBMINOR);
+ /* Version numbering */
+ if (TCLADDRESSBOOK_STAGE=='f') {
+ if (TCLADDRESSBOOK_SUBMINOR) {
+ sprintf(vstr,"%d.%d\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR);
+ } else {
+ sprintf(vstr,"%d.%d.%d\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR, TCLADDRESSBOOK_SUBMINOR);
+ }
+ } else {
+ sprintf(vstr,"%d.%d%c%d\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR,
+ TCLADDRESSBOOK_STAGE, TCLADDRESSBOOK_SUBMINOR);
+ }
- /* Declare the addressbook package. */
+ /* Declare the addressbook package */
if (Tcl_PkgProvide(interp, "addressbook", vstr) != TCL_OK) {
return TCL_ERROR;
}
// Store a global token for the macRoman encoding. If NULL is returned,
- // an error message is left by Tcl_GetEncoding in interp's result.
+ // an error message is left by Tcl_GetEncoding in the interp's result.
gMacRomanEnc = Tcl_GetEncoding(interp,"macRoman");
if (gMacRomanEnc == NULL) {
return TCL_ERROR;
|
|
From: <bde...@us...> - 2004-01-05 04:50:39
|
Update of /cvsroot/tcladdressbook/CVSROOT In directory sc8-pr-cvs1:/tmp/cvs-serv29790/CVSROOT Modified Files: modules Log Message: Added Contribs module Index: modules =================================================================== RCS file: /cvsroot/tcladdressbook/CVSROOT/modules,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- modules 1 Dec 2003 17:05:53 -0000 1.2 +++ modules 5 Jan 2004 04:50:31 -0000 1.3 @@ -24,5 +24,5 @@ # character to interpose another module into the current module. This # can be useful for creating a module that consists of many directories # spread out over the entire source repository. -TclAddressBook -a Source -TclAddressBookAll -a Source Help \ No newline at end of file +TclabSrc -a Source +TclabAll -a Source Help Contribs \ No newline at end of file |
|
From: <bde...@us...> - 2004-01-05 04:40:06
|
Update of /cvsroot/tcladdressbook/Contribs/Tcl In directory sc8-pr-cvs1:/tmp/cvs-serv28609/Tcl Log Message: Directory /cvsroot/tcladdressbook/Contribs/Tcl added to the repository |
|
From: <bde...@us...> - 2004-01-05 04:39:34
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha In directory sc8-pr-cvs1:/tmp/cvs-serv28511/Alpha Log Message: Directory /cvsroot/tcladdressbook/Contribs/Alpha added to the repository |
|
From: <bde...@us...> - 2004-01-05 04:39:16
|
Update of /cvsroot/tcladdressbook/Contribs In directory sc8-pr-cvs1:/tmp/cvs-serv28476/Contribs Log Message: Directory /cvsroot/tcladdressbook/Contribs added to the repository |
|
From: <bde...@us...> - 2003-12-28 07:50:49
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1:/tmp/cvs-serv4640/Source Modified Files: Changes.Log Log Message: Update for 1.0d12 Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Changes.Log 14 Dec 2003 17:21:53 -0000 1.10 +++ Changes.Log 28 Dec 2003 07:50:45 -0000 1.11 @@ -32,6 +32,21 @@ ================================================================================ ================================================================================ += 1.0d12 last update: 2003-12-28 07:54:58 +================================================================================ + The [search] command now handles labelled and keyed values. One can + specify an empty label or key to search over all possible labels or keys + respectively. + New [property type] command returning the type of a particular property. + +================================================================================ += 1.0d11 last update: 2003-12-20 18:16:31 +================================================================================ + Added a Home Page file for the project. + Fixed the encoding issues: it now correctly handles high bit chars and + accented letters. Uses UTF8 internally. + +================================================================================ = 1.0d10 last update: 2003-12-14 18:16:31 ================================================================================ Fixes crashing bug when [set] is called with a multidictionary value. |
|
From: <bde...@us...> - 2003-12-28 07:50:29
|
Update of /cvsroot/tcladdressbook/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv4575/Source
Modified Files:
TclAddressBook.c
Log Message:
[property type]
Index: TclAddressBook.c
===================================================================
RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- TclAddressBook.c 22 Dec 2003 06:41:48 -0000 1.22
+++ TclAddressBook.c 28 Dec 2003 07:50:26 -0000 1.23
@@ -1,7 +1,7 @@
/*
* File : "TclAddressBook.c"
* Created: 2003-11-26 12:54:15
- * Last modification: 2003-12-09 09:19:10
+ * Last modification: 2003-12-28 06:15:58
* Author: Bernard Desgraupes
* e-mail: <bde...@ea...>
*
@@ -468,7 +468,6 @@
CONST84 char * fromUID;
CFStringRef directCFStr;
int index, length, kind, result;
- TextEncoding theEncoding = GetApplicationTextEncoding();
Boolean removingFromGroup = false;
static CONST char *rmRecSwitches[] = {
@@ -491,7 +490,7 @@
result = TCL_OK;
directUID = Tcl_GetStringFromObj(objv[2], &length);
- directCFStr = CFStringCreateWithCString(NULL, directUID, theEncoding);
+ directCFStr = CFStringCreateWithCString(NULL, directUID, NULL);
// Get the address book
ab = ABGetSharedAddressBook();
@@ -583,7 +582,7 @@
return TCL_ERROR;
}
- uidRef = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(objv[2], &length), GetApplicationTextEncoding());
+ uidRef = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(objv[2], &length), NULL);
// Get the address book
ab = ABGetSharedAddressBook();
// Find the record corresponding to the UID
@@ -745,7 +744,7 @@
setIt = true;
}
- uidRef = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(objv[2], &length), GetApplicationTextEncoding());
+ uidRef = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(objv[2], &length), NULL);
// Get the address book
ab = ABGetSharedAddressBook();
// Find the record corresponding to the UID
@@ -881,7 +880,7 @@
// Retrieve the UID for the newly created record
uidRef = ABRecordCopyUniqueId(newRecord);
if (uidRef) {
- CFStringGetCString(uidRef, theUID, sizeof(theUID), GetApplicationTextEncoding());
+ CFStringGetCString(uidRef, theUID, sizeof(theUID), NULL);
CFRelease(uidRef);
Tcl_AppendStringsToObj(resultPtr, theUID, (char *) NULL);
}
@@ -955,7 +954,7 @@
ab = ABGetSharedAddressBook();
theUID = Tcl_GetStringFromObj(objv[objc-1], &length);
- uidRef = CFStringCreateWithCString(NULL, theUID, GetApplicationTextEncoding());
+ uidRef = CFStringCreateWithCString(NULL, theUID, NULL);
// Find the record corresponding to the UID
result = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord);
@@ -1033,6 +1032,7 @@
* Syntax:
* addressbook property add (-groups|-persons) propName propType
* addressbook property remove (-groups|-persons) propName
+ * addressbook property type (-groups|-persons) propName
* addressbook property names (-groups|-persons)
*
* Results:
@@ -1055,11 +1055,12 @@
int result, index, kind;
static CONST char *propSubcmdSwitches[] = {
- "add", "names", "remove", (char *) NULL
+ "add", "names", "remove", "type", (char *) NULL
};
enum {
- TCLAB_PROPERTY_ADD, TCLAB_PROPERTY_NAMES, TCLAB_PROPERTY_REMOVE
+ TCLAB_PROPERTY_ADD, TCLAB_PROPERTY_NAMES, TCLAB_PROPERTY_REMOVE,
+ TCLAB_PROPERTY_TYPE
};
static CONST char *propertySwitches[] = {
@@ -1067,7 +1068,7 @@
};
if (objc < 4) {
- Tcl_WrongNumArgs(interp, 2, objv, "(add|names|remove) (-groups|-persons) ?args?");
+ Tcl_WrongNumArgs(interp, 2, objv, "(add|names|remove|type) (-groups|-persons) ?args?");
return TCL_ERROR;
}
@@ -1093,6 +1094,10 @@
case TCLAB_PROPERTY_REMOVE:
result = TclAB_PropertyRemove(interp, objc, objv, resultPtr, kind);
break;
+
+ case TCLAB_PROPERTY_TYPE:
+ result = TclAB_PropertyType(interp, objc, objv, resultPtr, kind);
+ break;
}
return result;
@@ -1141,7 +1146,7 @@
Tcl_ResetResult(interp);
theUID = Tcl_GetStringFromObj(objv[2], &length);
- uidRef = CFStringCreateWithCString(NULL, theUID, GetApplicationTextEncoding());
+ uidRef = CFStringCreateWithCString(NULL, theUID, NULL);
// Get the address book
ab = ABGetSharedAddressBook();
@@ -1243,10 +1248,9 @@
ABPropertyType thePropType;
CONST84 char * theProperty;
CONST84 char * theValue;
- CFStringRef propertyRef, valueRef;
+ CFStringRef propertyRef, valueRef, keyRef, labelRef;
CFArrayRef foundItemsRef;
int i, index, opIndex, kind = rec_person, length;
- TextEncoding theEncoding = GetApplicationTextEncoding();
Boolean onlyID = false;
Boolean noCase = false;
Boolean isNumeric = false;
@@ -1306,7 +1310,7 @@
// Make CF objects. The kind of CF object for value depends on the type of
// the property (string, integer, date etc.)
- propertyRef = CFStringCreateWithCString(NULL, theProperty, theEncoding);
+ propertyRef = CFStringCreateWithCString(NULL, theProperty, kCFStringEncodingUTF8);
if (!propertyRef) {
Tcl_AppendStringsToObj(resultPtr, "Couldn't create property reference", (char *) NULL);
return TCL_ERROR;
@@ -1326,10 +1330,12 @@
isNumeric = true;
}
- // Create a CF reference for the searched value
- valueRef = TclAB_MultiValueFromTcl(interp, theValue, thePropType);
+ // Create a CF reference for the searched value, the label and the key
+ if (!TclAB_MakeSearchRefFromTcl(interp, theValue, thePropType, &labelRef, &keyRef, &valueRef)) {
+ return TCL_ERROR;
+ }
if (!valueRef) {
- Tcl_AppendStringsToObj(resultPtr, "Invalid value", (char *) NULL);
+ Tcl_AppendStringsToObj(resultPtr, "Couldn't create value reference", (char *) NULL);
CFRelease(propertyRef);
return TCL_ERROR;
}
@@ -1373,21 +1379,28 @@
switch (kind) {
case rec_person:
- theSearchElement = ABPersonCreateSearchElement(propertyRef, NULL, NULL, valueRef, comparison);
+ theSearchElement = ABPersonCreateSearchElement(propertyRef, labelRef, keyRef, valueRef, comparison);
break;
case rec_group:
- theSearchElement = ABGroupCreateSearchElement(propertyRef, NULL, NULL, valueRef, comparison);
+ theSearchElement = ABGroupCreateSearchElement(propertyRef, labelRef, keyRef, valueRef, comparison);
break;
}
CFRelease(propertyRef);
CFRelease(valueRef);
+ if (keyRef) CFRelease(keyRef);
+ if (labelRef) CFRelease(labelRef);
if (theSearchElement) {
foundItemsRef = ABCopyArrayOfMatchingRecords(ab, theSearchElement);
CFRelease(theSearchElement);
- TclAB_ResultListFromCFArray(interp, resultPtr, foundItemsRef, onlyID, kind);
- CFRelease(foundItemsRef);
+ if (foundItemsRef) {
+ TclAB_ResultListFromCFArray(interp, resultPtr, foundItemsRef, onlyID, kind);
+ CFRelease(foundItemsRef);
+ } else {
+ Tcl_AppendStringsToObj(resultPtr, "Couldn't get array of matching records", (char *) NULL);
+ return TCL_ERROR;
+ }
} else {
Tcl_AppendStringsToObj(resultPtr, "Couldn't build search element", (char *) NULL);
return TCL_ERROR;
@@ -1400,85 +1413,6 @@
/*
*----------------------------------------------------------------------
*
- * TclABCmd_Type --
- *
- * This procedure is invoked to process the [addressbook type] Tcl command.
- * See the user documentation for details on what it does.
- *
- * Syntax:
- * addressbook type recordID
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * See the user documentation.
- *
- *----------------------------------------------------------------------
- */
-
-int
-TclABCmd_Type(
- ClientData clientData, /* Not used. */
- Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *CONST objv[], /* Argument values. */
- Tcl_Obj *resultPtr) /* Pointer to store the result. */
-{
- ABAddressBookRef ab;
- CONST84 char * theUID;
- CFStringRef uidRef;
- CFStringRef typeRef;
- ABRecordRef theRecord;
- char theStr[256];
- int length, result;
- TextEncoding theEncoding = GetApplicationTextEncoding();
-
- if (objc != 3) {
- Tcl_WrongNumArgs(interp, 2, objv, "recordID");
- return TCL_ERROR;
- }
-
- result = TCL_OK;
- theUID = Tcl_GetStringFromObj(objv[2], &length);
-
- // Make a CFString object
- uidRef = CFStringCreateWithCString(NULL, theUID, theEncoding);
-
- // Get the address book
- ab = ABGetSharedAddressBook();
-
- // Is it a group or a person ?
- // NB: we could get the type from the UID directly with the function
- // ABCopyRecordTypeFromUniqueId() but it has been introduced only in
- // Panther and is not available in Jaguar. Workaround: get the record
- // reference and then the type from this record.
- // typeRef = ABCopyRecordTypeFromUniqueId(ab, uidRef);
- result = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord);
- CFRelease(uidRef);
- if (!result) {return TCL_ERROR;}
- typeRef = ABRecordCopyRecordType(theRecord);
- CFRelease(theRecord);
- if (!typeRef) {
- Tcl_AppendStringsToObj(resultPtr, "Unrecognized type for record", (char *) NULL);
- return TCL_ERROR;
- }
-
- if ( CFStringGetCString(typeRef, theStr, sizeof(theStr), theEncoding) ) {
- Tcl_AppendStringsToObj(resultPtr, theStr, (char *) NULL);
- } else {
- Tcl_AppendStringsToObj(resultPtr, "CFStringGetCString error", (char *) NULL);
- result = TCL_ERROR;
- }
-
- CFRelease(typeRef);
- return result;
-}
-
-
-/*
- *----------------------------------------------------------------------
- *
* TclABCmd_Set --
*
* This procedure is invoked to process the [addressbook set] Tcl command.
@@ -1516,7 +1450,6 @@
ABRecordRef theRecord;
ABPropertyType thePropType;
int kind, length, result;
- TextEncoding theEncoding = GetApplicationTextEncoding();
Boolean setIt = false;
if (objc != 4 && objc != 5) {
@@ -1535,8 +1468,8 @@
}
// Make CFString objects
- uidRef = CFStringCreateWithCString(NULL, theUID, theEncoding);
- propertyRef = CFStringCreateWithCString(NULL, theProperty, theEncoding);
+ uidRef = CFStringCreateWithCString(NULL, theUID, NULL);
+ propertyRef = CFStringCreateWithCString(NULL, theProperty, kCFStringEncodingUTF8);
// Get the address book
ab = ABGetSharedAddressBook();
@@ -1557,7 +1490,7 @@
}
if (thePropType == kABErrorInProperty) {
Tcl_AppendStringsToObj(resultPtr, "Unknown property '", theProperty,
- "' for ", kind ? "Person":"Group" , " record", (char *) NULL);
+ "' for ", kind ? "Person":"Group" , " records", (char *) NULL);
CFRelease(propertyRef);
CFRelease(theRecord);
return TCL_ERROR;
@@ -1590,3 +1523,79 @@
}
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclABCmd_Type --
+ *
+ * This procedure is invoked to process the [addressbook type] Tcl command.
+ * See the user documentation for details on what it does.
+ *
+ * Syntax:
+ * addressbook type recordID
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclABCmd_Type(
+ ClientData clientData, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *CONST objv[], /* Argument values. */
+ Tcl_Obj *resultPtr) /* Pointer to store the result. */
+{
+ ABAddressBookRef ab;
+ CONST84 char * theUID;
+ CFStringRef uidRef;
+ CFStringRef typeRef;
+ ABRecordRef theRecord;
+ char theStr[256];
+ int length, result;
+
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 2, objv, "recordID");
+ return TCL_ERROR;
+ }
+
+ result = TCL_OK;
+ theUID = Tcl_GetStringFromObj(objv[2], &length);
+
+ // Make a CFString object
+ uidRef = CFStringCreateWithCString(NULL, theUID, NULL);
+
+ // Get the address book
+ ab = ABGetSharedAddressBook();
+
+ // Is it a group or a person ?
+ // NB: we could get the type from the UID directly with the function
+ // ABCopyRecordTypeFromUniqueId() but it has been introduced only in
+ // Panther and is not available in Jaguar. Workaround: get the record
+ // reference and then the type from this record.
+ // typeRef = ABCopyRecordTypeFromUniqueId(ab, uidRef);
+ result = TclAB_RecordFromUID(ab, uidRef, resultPtr, &theRecord);
+ CFRelease(uidRef);
+ if (!result) {return TCL_ERROR;}
+ typeRef = ABRecordCopyRecordType(theRecord);
+ CFRelease(theRecord);
+ if (!typeRef) {
+ Tcl_AppendStringsToObj(resultPtr, "Unrecognized type for record", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if ( CFStringGetCString(typeRef, theStr, sizeof(theStr), NULL) ) {
+ Tcl_AppendStringsToObj(resultPtr, theStr, (char *) NULL);
+ } else {
+ Tcl_AppendStringsToObj(resultPtr, "CFStringGetCString error", (char *) NULL);
+ result = TCL_ERROR;
+ }
+
+ CFRelease(typeRef);
+ return result;
+}
|