|
From: | Michael Fötsch |
Subject: | Re: [Gnash-dev] youtube bugs for release |
Date: | Tue, 03 Mar 2009 19:53:24 +0100 |
User-agent: | Thunderbird 2.0.0.19 (X11/20090105) |
strk wrote:
There are many such cases in Gnash. Gnash is pickier about types than the proprietary player. This case should be not too hard to fix, probably just change the ensureType to require an as_object should work.
If I understand this correctly, casting to as_object works in this particular case because "getURL" only ever invokes methods that are defined right in as_object, such as "callMethod" and "getURLEncodedVars". It doesn't work in "movieclip_getSWFVersion" because that invokes "getSWFVersion", which is defined in class "MovieClip". Correct?
However, I don't fully understand when and where the object created in ActionScript with "new MovieClip()" ceases to be of type MovieClip*. I assume the "new MovieClip()" in ActionScript leads to a "new MovieClip()" in C++. Isn't this MovieClip* just being upcasted to as_object* (while being the same "this" pointer)? Obviously not, because the "dynamic_cast" back to MovieClip* doesn't work. Where in the C++ code does the MovieClip lose its MovieClip-ness? (I know this is a basic question, but any insights are greatly appreciated.)
Kind Regards, M.F.
[Prev in Thread] | Current Thread | [Next in Thread] |