On Tue, Mar 06, 2007 at 02:56:33PM +0000, Ann Barcomb wrote:

> --- server/asobj/xmlsocket.cpp        23 Feb 2007 18:27:37 -0000      1.7
> +++ server/asobj/xmlsocket.cpp        6 Mar 2007 14:56:33 -0000       1.8
> @@ -479,9 +479,10 @@
>      
>      as_object*       xmlsock_obj = new xmlsocket_as_object;
>      //log_msg("\tCreated New XMLSocket object at 0x%X\n", (unsigned 
> int)xmlsock_obj);
> -    xmlsock_obj->init_member("connect", &xmlsocket_connect);
> -    xmlsock_obj->init_member("send", &xmlsocket_send);
> -    xmlsock_obj->init_member("close", &xmlsocket_close);
> +    xmlsock_obj->init_member("connect",
> +                             new builtin_function(xmlsocket_connect));
> +    xmlsock_obj->init_member("send", new builtin_function(xmlsocket_send));
> +    xmlsock_obj->init_member("close", new builtin_function(xmlsocket_close));

These methods should likely be *inherited* rather then attached to the 
xmlsocket_as_object
*instance*. This would be done by explicitly calling the as_object constructor 
and passing
it the exported "interface", as in:

class xmlsocket_as_object : public gnash::as_object
{
public:
        xmlsocket_as_object()
                :
                as_object(getXmlSocketInterface())
        {}

        XMLSocket obj;
};

This will allow users to override methods or add new ones and immediately
see them available in their instances.

--strk;


_______________________________________________
Gnash-commit mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-commit

Reply via email to