How to use AG_Bind and make possible to save (and load in future
session) variable? For example I have variable 'value' that can be
changed not by AG_Set. I suggest to use AG_Bind and hope that when
program terminated this value will be saved. But 'value' will saved only
after using AG_Set :(. 

--8<---------------cut here---------------start------------->8---
 // map variable to 'value'
 AG_BindUint32(agConfig, "cel.flags.r", &value);
 if (!AG_GetBool(agConfig, "cel.flags.init")){
     // here some default value computation
     set_default_value(&value); 
 }
 // just mark that value already setuped 
 AG_SetBool(agConfig, "cel.flags.init", 1);
--8<---------------cut here---------------end--------------->8---

Sure I can use AG_Set at program's termination, but what profit of
AG_Bind than?

_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to