[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog doc/C/internals.xml
From: |
Rob Savoye |
Subject: |
[Gnash-commit] gnash ./ChangeLog doc/C/internals.xml |
Date: |
Sat, 11 Feb 2006 01:01:25 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Rob Savoye <address@hidden> 06/02/11 01:01:24
Modified files:
. : ChangeLog
doc/C : internals.xml
Log message:
* doc/C/internals.xml: Add section on adding properties to an
ActionScript class.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.120&tr2=1.121&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/doc/C/internals.xml.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.120 gnash/ChangeLog:1.121
--- gnash/ChangeLog:1.120 Sat Feb 11 00:16:46 2006
+++ gnash/ChangeLog Sat Feb 11 01:01:17 2006
@@ -1,3 +1,8 @@
+2006-02-10 Rob Savoye <address@hidden>
+
+ * doc/C/internals.xml: Add section on adding properties to an
+ ActionScript class.
+
2006-02-10 Sandro Santilli <address@hidden>
* server/action.{cpp,h}: added doActionCallMethod,
Index: gnash/doc/C/internals.xml
diff -u gnash/doc/C/internals.xml:1.8 gnash/doc/C/internals.xml:1.9
--- gnash/doc/C/internals.xml:1.8 Thu Feb 9 22:39:58 2006
+++ gnash/doc/C/internals.xml Sat Feb 11 01:01:20 2006
@@ -376,6 +376,38 @@
}
</programlisting>
</para>
+
+ <sect5 id="defprop">
+ <title>Adding a Property</title>
+
+ <para>
+ Adding a new new property to an object is similar to
+ adding a callback for a method. Instead of using a C
+ function, a string or number is used.
+
+ <programlisting>
+ as_obj->set_member("nodeName", as_value("HelloWorld"));
+ </programlisting>
+
+ When this is looked up by a Flash movie as a property, the
+ value is found, instead of needing to make a function
+ call. This scrap of ActionScript code as compiled by
+ Ming's <code>makeswf</code> compiler shows the
+ difference.
+
+ <programlisting>
+ // Call the jasChildNodes() function
+ if (node.hasChildNodes() == true) {
+ trace("CHILDREN");
+ }
+ // Get the value of the nodeName property
+ if (node.nodeName == "HelloWorld") {
+ trace("MATCHED");
+ }
+ </programlisting>
+
+ </para>
+ </sect5>
</sect4>
</sect3>