Hi everybody,
Currently I'm trying to create a new module for E. Doing this I faced
with the following problem. I have the following module header:
typedef _Extra Extra;
typedef _Config Config;
struct _Extra
{
int a;
char *b;
};
stuct _Config
{
int a;
Extra *e;
};
I need to store the Config into the config file. The question is how to
deal with the sub-structure in the _Config structure. I tried to use
E_CONFIG_SUB, but I did not get any result. Unfortunatelly I did not
find any examples of using it. So, probably, I just incorectly used it.
But for me it seems to be as easy as with E_CONFIG_LIST :-\
THe following code illustrate the steps I do to load the data from
the confgi file :
E_Config_DD conf_edd;
E_Config_DD conf_extra_edd;
....
// Loading config :
conf_extra_edd = E_CONFIG_DD_NEW("Extra_Config", Extra);
#undef T
#undef D
#define T Extra
#define D conf_extra_edd
E_CONFIG_VAL(T, D, a, INT);
E_CONFIG_VAL(T, D, b, STR);
conf_edd = E_CONFIG_DD_NEW("Module_Config", Config);
#undef T
#undef D
#define T Config
#define D conf_edd
E_CONFIG_VAL(T, D, a, INT);
E_CONFIG_SUB(T, D, e, conf_extra_edd);
m->conf = e_config_domain_load("module.somemodule", conf_edd);
if (!m->conf)
{
...
}
...
What can be wrong with this code ? Please help :)
sn
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel