[seed] ClutterPad: Update template to include GObject, so animations work



commit 653779521ce91faab979da1141f933739448b2ac
Author: Tim Horton <hortont svn gnome org>
Date:   Wed May 13 08:46:57 2009 -0400

    ClutterPad: Update template to include GObject, so animations work
---
 examples/clutter-pad.js |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/examples/clutter-pad.js b/examples/clutter-pad.js
index ea324e2..92338c9 100755
--- a/examples/clutter-pad.js
+++ b/examples/clutter-pad.js
@@ -21,6 +21,11 @@ var stage_manager = Clutter.StageManager.get_default();
 
 function evaluate(button)
 {
+	var children = stage.get_children();
+				
+	for(var id in children)
+		stage.remove_actor(children[id]);
+	
     try
     {
 		error_buf.text = '';
@@ -62,14 +67,10 @@ function new_file()
 {
 	current_filename = "";
 	
-	source_buf.text = "Clutter = imports.gi.Clutter;\nstage = Clutter.Stage.get_default();\n";
+	source_buf.text = "GObject = imports.gi.GObject;\nClutter = imports.gi.Clutter;\nstage = Clutter.Stage.get_default();\n";
 	
 	// TODO: cleanse the stage (or make a new one!) each time around...
-	
-	var children = stage.get_children();
-				
-	for(var id in children)
-		stage.remove_actor(children[id]);
+	// really should be done in evaluate, though
 	
 	//if(gtkstage)
 		//pane.remove(gtkstage);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]