[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] Where should new actionscript classes go?
From: |
strk |
Subject: |
Re: [Gnash-dev] Where should new actionscript classes go? |
Date: |
Mon, 8 Sep 2008 18:47:47 +0200 |
On Sun, Sep 07, 2008 at 07:17:23PM +0800, Tom Stellard wrote:
> In order to get AVM2 working, I am having to add a lot of the Actionscript
> 3.0 classes to gnash. Most of these classes are in some of the different
> flash namespaces, like flash.display, flash.text etc. Should I be adding
> these new classes as members of their respective namespace/package objects?
> For example, a class in the flash.display namespace would have its class
> definition live in libcore/asobj/flash/display, and I would add a line of
> code like NewClass_class_init(*pkg) to the get_flash_display_package
> function to initialize the class. Or, should I just add a new entry for
> each class in the ClassHierarchy::knownClasses array?
Probably both.
For AVM1 the only way to access stuff in subpackages
was trough GETMEMBER, so in your example above
it would go:
push 'flash'
getmember // gnash triggers get_flash_package
push 'display'
getmember // gnash triggers get_flash_display_package
If AVM2 gives access to those classes w/out all those
getmember this auto-load mechanism won't work.
I guess the ClassHierarchy thing triggers the loaders
based on name and namespace, so I'd try using both.
--strk;