gnash-dev
[Top][All Lists]
Advanced

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

Re: [Gnash-dev] Implementation: Doc vs. Code


From: Michael Meier
Subject: Re: [Gnash-dev] Implementation: Doc vs. Code
Date: Sun, 19 Nov 2006 19:24:13 +0100
User-agent: Debian Thunderbird 1.0.2 (X11/20060926)

> 
>>>Why aren't the valueof and tostring methods registered?
>>
>>If you gnash (or gprocessor) with the -va switch (verbose actions)
>>you should get more information about what's going on and what is failing.
> 
> 
> Took a closer look, the boolean_as_object just missed the constructor!
> Here it is:
> 
>         boolean_as_object()
>                 :
>                 as_object(getBooleanInterface())
>         {}
> 
> gen-asclass.sh is now fixed in HEAD. Thanks for pointing out.
> 
> ---strk;

Thanks for the tips. gnash with the -va switch is really very very
verbose  :)

I re-generated the Boolean class with the fixed gen-asclass.sh. It's
working now!
I implemented the valueof and the tostring methods. At least I think
they are implemted correctly as the tests all pass:

19:12:37: SWF - Gnash-cvs-20061119
19:12:37: PASSED: boolObj [30]
19:12:37: PASSED: boolObj.tostring != undefined [33]
19:12:37: PASSED: boolObj.valueof != undefined [36]
19:12:37: XPASSED: defaultBool.toString() == "false" [39]
19:12:37: XPASSED: defaultBool.valueOf() == false [40]
19:12:37: XPASSED: trueBool.toString() == "true" [43]
19:12:37: XPASSED: trueBool.valueOf() == true [44]
19:12:37: XPASSED: falseBool.toString() == "false" [47]
19:12:37: XPASSED: falseBool.valueOf() == false [48]


I'm not sure about the tostring function: Should they pass
"true"/"false" or "(true)"/"(false")? The latter is what I read in the
ActionScript reference.


As I don't know an other place to post this to, I attached Boolean.h and
 Boolean.cpp! Feedback welcome!
To build the line
set_member("Boolean", as_value(boolean_new));

in Global.cpp has to be removed and

boolean_class_init(*this);

has to be added. If I'm getting this right :D



cheers,
Michael




reply via email to

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