Enlightenment CVS committal
Author : dj2
Project : e17
Module : docs
Dir : e17/docs/cookbook/xml
Modified Files:
ecore_recipes.xml
Log Message:
- fix the ecore_config example to conform to the new api.
- make the ecore_config_init check ECORE_CONFIG_ERR_SUCC instead of 0
dj2
===================================================================
RCS file: /cvsroot/enlightenment/e17/docs/cookbook/xml/ecore_recipes.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore_recipes.xml 6 May 2004 23:34:18 -0000 1.3
+++ ecore_recipes.xml 15 Jun 2004 04:18:04 -0000 1.4
@@ -80,20 +80,20 @@
float j;
char *str;
- if (ecore_config_init("foo") != 0) {
+ if (ecore_config_init("foo") != ECORE_CONFIG_ERR_SUCC) {
printf("Cannot init Ecore_Config");
return 1;
}
- ecore_config_default_int("/int_example", 1);
- ecore_config_default_string("/this/is/a/string/example", "String");
- ecore_config_default_float("/float/example", 2.22);
+ ecore_config_int_default("/int_example", 1);
+ ecore_config_string_default("/this/is/a/string/example", "String");
+ ecore_config_float_default("/float/example", 2.22);
ecore_config_load();
- i = ecore_config_get_int("/int_example");
- str = ecore_config_get_string("/this/is/a/string/example");
- j = ecore_config_get_float("/float/example");
+ i = ecore_config_int_get("/int_example");
+ str = ecore_config_string_get("/this/is/a/string/example");
+ j = ecore_config_float_get("/float/example");
printf("str is (%s)\n", str);
printf("i is (%d)\n", i);
@@ -114,14 +114,14 @@
<para>
For each configuration variable you are getting from Ecore_Config, you can assign a
default value in the case
-that the user does not have a config.db file. The defaults are assigned with the
ecore_config_default_* where *
+that the user does not have a config.db file. The defaults are assigned with the
ecore_config_*_default where *
is one of the Ecore_Config types. The first parameter is the key under which this is
to be accessed. These keys
must be unique over your program. The value passed is of the type appropriated for
this call.
</para>
<para>
The ecore_config_load call will read the values from the config.db file into
Ecore_Config. After which we can
-access the files with the ecore_config_get_* methods (again * is the type of data
desired). These routines
+access the files with the ecore_config_*_get methods (again * is the type of data
desired). These routines
take the key name for this item and return the value associated with that key. Each
function returns a type
that corresponds to the function call name.
</para>
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs