[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] How do I implement a function in a flash package?

From: strk
Subject: Re: [Gnash-dev] How do I implement a function in a flash package?
Date: Mon, 25 Aug 2008 20:34:49 +0200

On Mon, Aug 25, 2008 at 10:04:18PM +0800, Tom Stellard wrote:
> I am trying to get the Haxe test case to work with AVM2, and I am running
> into a problem when AVM2 tries to call the "getQualifiedClassName" function
> in the flash.utils package. 

What problem ?

> It seems to me like the AVM2 is expecting the
> "getQualifiedClassName" function to be a accessible from the global object.

You mean _global.getQualifiedClassName ?
Or simply 'getQualifiedClassName' with no 'flash.utils' prefix ?

> I have tried adding the package to the native class array, but  the AVM2
> still cannot find the function when I search the global object, using the
> as_object::findProperty function. 

With the AVM1 layout, and what you find in the 'flash' package as existing
gnash code, you need to fully qualify the names, thus:


Any other way to call it must rely on scope chain (which usually ends
with the _global object being scanned).

> I didn't see any other already
> implemented packages that contained any global functions, so I was wondering
> if someone could spot what I am doing wrong or suggest a better way.  I have
> attached a patch of what I have done so far.

I suspect you're talking about namespaces here, not packages ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]