Enlightenment CVS committal

Author  : dresb
Project : e17
Module  : docs

Dir     : e17/docs/cookbook/xml/ecore


Modified Files:
        ecore_config_intro.xml 


Log Message:
included section about the CLI util "ecore_config"

===================================================================
RCS file: /cvs/e/e17/docs/cookbook/xml/ecore/ecore_config_intro.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ecore_config_intro.xml      22 Jan 2008 14:33:23 -0000      1.4
+++ ecore_config_intro.xml      22 Jan 2008 17:37:19 -0000      1.5
@@ -111,20 +111,41 @@
 <para>
 To compile the program you can use pkg-config to get all of the required
 linking and library information for Ecore_Config.
+
+If you run this program as is you will receive the values put into ecore_config
+as the defaults as output. Once you know the program is working, you can create
+a simple custom.eet file to read the values.
 </para>
 
+<example>
+    <title>Simple config.db script (build_cfg_db.sh)</title>
+    <programlisting>
+        #!/bin/sh
+        
+        DB=config.eet
+        
+        ecore_config -c $DB -k /int_example              -i 2
+        ecore_config -c $DB -k /this/is/a/string/example -s "this is a string"
+        ecore_config -c $DB -k /float/example            -f 42.10101
+    </programlisting>
+</example>
+
 <para>
-Changing the configuration values and saving those changes is similar to
-loading them. To execute the following example simply insert the source code
-before calling the library shutdown function and recompile.
+When build_cfg_db.sh is executed it will create a custom.eet file in the
+current directory. This file can then be copied into 
~/.e/apps/PROGRAM_NAME/config.eet
+where PROGRAM_NAME is the value passed into ecore_config_init. Once the file is
+copied in place, executing the test program again will show the values given in
+the config file instead of the defaults. You can specify as many, or as few of
+the configuration keys in the config file and Ecore_Config will either show the
+user value or the default value.
 </para>
 
-<!--
-
-NOTE: edb_ed does not seem to be able of opening files created with 
Ecore_Config
-      and vice versa anymore. I replaced that part with a example about saving
-      changes using the API.
--->
+<para>
+Changing the configuration values from the application and  and saving those
+changes is similar to loading them. To execute the following example simply
+insert the source code before calling the library shutdown function and
+recompile.
+</para>
 
 <example>
 <title>Saving configuration changes</title>
@@ -133,8 +154,8 @@
     
 if (ecore_config_save() != ECORE_CONFIG_ERR_SUCC) {
     printf("WARNING: could not save config to ~/.e/apps/config.eet\n");
-} else {
-    printf("In the next execution str will be \"Other string\"\n");
+}else{
+    printf("NOTE: in the next execution Str will be \"Other String\"\n")
 }
 </programlisting>
 </example>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to