seed r146 - trunk/tests
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r146 - trunk/tests
- Date: Thu, 6 Nov 2008 15:28:37 +0000 (UTC)
Author: racarr
Date: Thu Nov 6 15:28:37 2008
New Revision: 146
URL: http://svn.gnome.org/viewvc/seed?rev=146&view=rev
Log:
Make subclass example tie up the prototype chain and test methods.
Modified:
trunk/tests/subclass.js
Modified: trunk/tests/subclass.js
==============================================================================
--- trunk/tests/subclass.js (original)
+++ trunk/tests/subclass.js Thu Nov 6 15:28:37 2008
@@ -11,12 +11,14 @@
{
this.gobject_parent = new Gtk.Label({label: "Hello World"});
}
+HelloLabel.prototype = Seed.prototype(Gtk.Label);
function FooedHelloLabel()
{
this.gobject_parent = new HelloLabel();
this.fooed = true;
}
+FooedHelloLabel.prototype = HelloLabel.prototype;
function NotALabel()
{
@@ -39,7 +41,13 @@
{
if (widget.fooed == true)
{
- Seed.print("Found a fooed widget");
+ widget.set_text("Fooed");
+ }
+ else
+ {
+ widget.set_text("Not fooed");
}
});
+w.show_all();
+Gtk.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]