[Swfdec] Question about SwfdecAsRelay

Benjamin Otte otte at gnome.org
Thu Aug 20 07:58:16 PDT 2009


Hey,

SwfdecAsRelay is the object that relays things from the actionscript to the
native objects (and back). I invented it back when I realized that the
native object that a script object refers to is decided when a constructor
is run.
So I needed to split the actual script object from the native object.
Previously - until late into the 0.7 cycle I think - they were the same
objects, and everything inherited from SwfdecAsObject and that caused issues
when we did mad stuff (like calling two different native constructors on the
object).
The relevant test is test/trace/constructor-relay.as

These days, we just change the relay the object points to and get on with
life.

Cheers,
Benjamin

On Thu, Aug 20, 2009 at 4:40 PM, zou lunkai <zoulunkai at gmail.com> wrote:

> Hello,
>
> The AsRelay object(defined in swfdec_as_relay.h) is the last few things I
> still couldn't quite understand in swfdec. I guess the problem is that I
> haven't found a related concept in ActionScript. So there are number of
> question to me for a long time. What is AsRelay used for? Why we need it?
> And how to use it in general? They might be the same question, though. It
> would be great if anyone could explain these questions for me.  Thanks
> ahead!
>
> --zou
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/swfdec/attachments/20090820/2dd1a38d/attachment.htm 


More information about the Swfdec mailing list