Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/edje

Dir     : e17/libs/edje/data/src


Modified Files:
        e_logo.edc 


Log Message:


busy adding some MEAT to edje's embryo script support. just added
"persistent" variables - ie tied to each instance of an edje object and you
can save/load via get_int() set_int() get_float() set_float(), get_str(),
get_strlen() and set_str(). the values are fetched/stored wherever you do
these calls. you need a public variable declaration to indicate you want to
use a global var, and use this variable handle as the variable index - edje
will init it for you.

e_logo.edc has some examples...
:)

this solves being able to keep state like if a check button is enabled or
disabled etc. etc. etc.
then i guess its onto the rest of the calls...

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/data/src/e_logo.edc,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- e_logo.edc  28 Mar 2004 06:21:52 -0000      1.25
+++ e_logo.edc  30 Mar 2004 10:30:35 -0000      1.26
@@ -143,6 +143,11 @@
         item: "My Data" "The string to attach to this data";
         item: "The Key" "String data attached to the key";
       }
+      script {
+        public global_int;
+        public global_float;
+        public global_str;
+      }
       parts {
         part {
            name:          "background";
@@ -468,6 +473,25 @@
 //         action:     SIGNAL_EMIT "do_it" "the_source";
            script {
               emit("PROGRAAAAAAAM", "TEEEEEEEEEEEEEST");
+              set_int(global_int, 10);
+              set_float(global_float, 10.0);
+              set_str(global_str, "smelly fish");
+              new buf[256];
+              
+              new i;
+              i = get_int(global_int);
+              snprintf(buf, 256, "1. i = %i :)", i);
+              emit("DEBUG...", buf);
+              
+              new Float:f;
+              f = get_float(global_float);
+              snprintf(buf, 256, "2. f = %f :)", f);
+              emit("DEBUG...", buf);
+              
+              new s[256];
+              get_str(global_str, s, 256);
+              snprintf(buf, 256, "3. s = %s :)", s);
+              emit("DEBUG...", buf);
            }
         }
         program {




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to