Runtime error 1053 when trying to use dynamic methods.

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Runtime error 1053 when trying to use dynamic methods.

Blue Sans douze
Hi list.

When I try to do something like
public dynamic function initialize(nb:Int):Void {}

targeting flash player 10, it crash at Verify with the runtime error 1053 "Illegal override of LiveGather in com.LiveGather".
LiveGather is the class containing the dynamic methods.

When I remove the dynamics from my functions, it compiles and runs without any problem.

What can I do to make that work ?
Is that a bug ? Is there a workaround ?

Thanks.
Blue112.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

Blue Sans douze
Trying to simply the problem, it only happens when my class implements an interface :

This code fails :
class Test implements ITest
{
static public function main(){}

public var a:Int->Void;
}

interface ITest
{
function a(progress:Int):Void;
}

##Compiles with
haxe -swf out.swf -main Test.hx

Blue112.


2011/9/23 Blue Sans douze <[hidden email]>
Hi list.

When I try to do something like
public dynamic function initialize(nb:Int):Void {}

targeting flash player 10, it crash at Verify with the runtime error 1053 "Illegal override of LiveGather in com.LiveGather".
LiveGather is the class containing the dynamic methods.

When I remove the dynamics from my functions, it compiles and runs without any problem.

What can I do to make that work ?
Is that a bug ? Is there a workaround ?

Thanks.
Blue112.


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

bubblebenj
Just curious, what is a dynamic function have typed arguments and not returning anything ?
What is it supposed to do ?

Ben

On Fri, Sep 23, 2011 at 11:32 AM, Blue Sans douze <[hidden email]> wrote:
Trying to simply the problem, it only happens when my class implements an interface :

This code fails :
class Test implements ITest
{
static public function main(){}

public var a:Int->Void;
}

interface ITest
{
function a(progress:Int):Void;
}

##Compiles with
haxe -swf out.swf -main Test.hx

Blue112.



2011/9/23 Blue Sans douze <[hidden email]>
Hi list.

When I try to do something like
public dynamic function initialize(nb:Int):Void {}

targeting flash player 10, it crash at Verify with the runtime error 1053 "Illegal override of LiveGather in com.LiveGather".
LiveGather is the class containing the dynamic methods.

When I remove the dynamics from my functions, it compiles and runs without any problem.

What can I do to make that work ?
Is that a bug ? Is there a workaround ?

Thanks.
Blue112.


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

bubblebenj
If i follow you you may want to do :
a = function a(progress:Int):Void{};

On Fri, Sep 23, 2011 at 11:44 AM, benjamin Dubois <[hidden email]> wrote:
Just curious, what is a dynamic function have typed arguments and not returning anything ?
What is it supposed to do ?

Ben

On Fri, Sep 23, 2011 at 11:32 AM, Blue Sans douze <[hidden email]> wrote:
Trying to simply the problem, it only happens when my class implements an interface :

This code fails :
class Test implements ITest
{
static public function main(){}

public var a:Int->Void;
}

interface ITest
{
function a(progress:Int):Void;
}

##Compiles with
haxe -swf out.swf -main Test.hx

Blue112.



2011/9/23 Blue Sans douze <[hidden email]>
Hi list.

When I try to do something like
public dynamic function initialize(nb:Int):Void {}

targeting flash player 10, it crash at Verify with the runtime error 1053 "Illegal override of LiveGather in com.LiveGather".
LiveGather is the class containing the dynamic methods.

When I remove the dynamics from my functions, it compiles and runs without any problem.

What can I do to make that work ?
Is that a bug ? Is there a workaround ?

Thanks.
Blue112.


--
haXe - an open source web programming language
http://haxe.org



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

bubblebenj
sorry
a = function (progress:Int):Void{};

On Fri, Sep 23, 2011 at 11:47 AM, benjamin Dubois <[hidden email]> wrote:
If i follow you you may want to do :
a = function a(progress:Int):Void{};


On Fri, Sep 23, 2011 at 11:44 AM, benjamin Dubois <[hidden email]> wrote:
Just curious, what is a dynamic function have typed arguments and not returning anything ?
What is it supposed to do ?

Ben

On Fri, Sep 23, 2011 at 11:32 AM, Blue Sans douze <[hidden email]> wrote:
Trying to simply the problem, it only happens when my class implements an interface :

This code fails :
class Test implements ITest
{
static public function main(){}

public var a:Int->Void;
}

interface ITest
{
function a(progress:Int):Void;
}

##Compiles with
haxe -swf out.swf -main Test.hx

Blue112.



2011/9/23 Blue Sans douze <[hidden email]>
Hi list.

When I try to do something like
public dynamic function initialize(nb:Int):Void {}

targeting flash player 10, it crash at Verify with the runtime error 1053 "Illegal override of LiveGather in com.LiveGather".
LiveGather is the class containing the dynamic methods.

When I remove the dynamics from my functions, it compiles and runs without any problem.

What can I do to make that work ?
Is that a bug ? Is there a workaround ?

Thanks.
Blue112.


--
haXe - an open source web programming language
http://haxe.org




--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

Blue Sans douze
Later, in my soft, I'll do something like
Test.a = myOtherFunction;

But that's not the problem, the flashplayer crash with or without it.
Blue112


2011/9/23 benjamin Dubois <[hidden email]>
sorry
a = function (progress:Int):Void{};


On Fri, Sep 23, 2011 at 11:47 AM, benjamin Dubois <[hidden email]> wrote:
If i follow you you may want to do :
a = function a(progress:Int):Void{};


On Fri, Sep 23, 2011 at 11:44 AM, benjamin Dubois <[hidden email]> wrote:
Just curious, what is a dynamic function have typed arguments and not returning anything ?
What is it supposed to do ?

Ben

On Fri, Sep 23, 2011 at 11:32 AM, Blue Sans douze <[hidden email]> wrote:
Trying to simply the problem, it only happens when my class implements an interface :

This code fails :
class Test implements ITest
{
static public function main(){}

public var a:Int->Void;
}

interface ITest
{
function a(progress:Int):Void;
}

##Compiles with
haxe -swf out.swf -main Test.hx

Blue112.



2011/9/23 Blue Sans douze <[hidden email]>
Hi list.

When I try to do something like
public dynamic function initialize(nb:Int):Void {}

targeting flash player 10, it crash at Verify with the runtime error 1053 "Illegal override of LiveGather in com.LiveGather".
LiveGather is the class containing the dynamic methods.

When I remove the dynamics from my functions, it compiles and runs without any problem.

What can I do to make that work ?
Is that a bug ? Is there a workaround ?

Thanks.
Blue112.


--
haXe - an open source web programming language
http://haxe.org




--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

Nicolas Cannasse
In reply to this post by Blue Sans douze
Le 23/09/2011 11:32, Blue Sans douze a écrit :

> Trying to simply the problem, it only happens when my class implements
> an interface :
>
> This code fails :
>
> class Test implements ITest
>
>
> {
> static public function main(){}
>
>
>
> public var a:Int->Void;
> }
>
>
>
> interface ITest
> {
>
>
> function a(progress:Int):Void;
> }

I will have to strengthen the checks for the interface in order to
refuse dynamic functions or normal fields whereas a standard method is
expected.

Please report it on code.google.com/p/haxe/issues

Best,
Nicolas


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

bubblebenj
The only document I found talking about dynamic function is the haxe 2.0 changes.
It may deserve some room within the language references ?
I don't see how one haXe newcomer can be aware of such a feature if it only exist in a change log.

Tell me where it should be added, I'll be glad to do it.

Ben

On Fri, Sep 23, 2011 at 12:18 PM, Nicolas Cannasse <[hidden email]> wrote:
Le 23/09/2011 11:32, Blue Sans douze a écrit :

Trying to simply the problem, it only happens when my class implements
an interface :

This code fails :

class Test implements ITest


{
       static public function main(){}



       public var a:Int->Void;
}



interface ITest
{


       function a(progress:Int):Void;
}

I will have to strengthen the checks for the interface in order to refuse dynamic functions or normal fields whereas a standard method is expected.

Please report it on code.google.com/p/haxe/issues

Best,
Nicolas


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

Blue Sans douze
In reply to this post by Nicolas Cannasse
Issue created.
http://code.google.com/p/haxe/issues/detail?id=513
Blue112


2011/9/23 Nicolas Cannasse <[hidden email]>
Le 23/09/2011 11:32, Blue Sans douze a écrit :

Trying to simply the problem, it only happens when my class implements
an interface :

This code fails :

class Test implements ITest


{
       static public function main(){}



       public var a:Int->Void;
}



interface ITest
{


       function a(progress:Int):Void;
}

I will have to strengthen the checks for the interface in order to refuse dynamic functions or normal fields whereas a standard method is expected.

Please report it on code.google.com/p/haxe/issues

Best,
Nicolas


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

Nicolas Cannasse
In reply to this post by bubblebenj
Le 23/09/2011 13:06, benjamin Dubois a écrit :
> The only document I found talking about dynamic function is the haxe 2.0
> changes <http://haxe.org/doc/advanced/haxe2>.
> It may deserve some room within the language references ?
> I don't see how one haXe newcomer can be aware of such a feature if it
> only exist in a change log.
>
> Tell me where it should be added, I'll be glad to do it.

At the good place in the language reference.

Nicolas

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

bubblebenj
Nice...
Don't want to spend more time on that.

Ben

On Fri, Sep 23, 2011 at 1:53 PM, Nicolas Cannasse <[hidden email]> wrote:
Le 23/09/2011 13:06, benjamin Dubois a écrit :
The only document I found talking about dynamic function is the haxe 2.0
changes <http://haxe.org/doc/advanced/haxe2>.

It may deserve some room within the language references ?
I don't see how one haXe newcomer can be aware of such a feature if it
only exist in a change log.

Tell me where it should be added, I'll be glad to do it.

At the good place in the language reference.


Nicolas

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

jlm@justinfront.net
This is well written up, noticed recently that if you do this...

var dynamicVar: Dynamic;
dynamicVar = 'hello';
var stringVar = dynamicVar;

and stringVar will be typed as String, not checked on all platforms but I think atleast it's true on javascript platform.

Also noticed that 

var str="test";
myFunc( str );

public function myFunc( a )
{
trace( Type.typeof( a ) );
}

effectively is implicitly typing a as a string, so you can't call the function later with a number, if this not documented it would be good to add.



On 23 Sep 2011, at 13:22, benjamin Dubois wrote:

Nice...
Don't want to spend more time on that.

Ben

On Fri, Sep 23, 2011 at 1:53 PM, Nicolas Cannasse <[hidden email]> wrote:
Le 23/09/2011 13:06, benjamin Dubois a écrit :
The only document I found talking about dynamic function is the haxe 2.0
changes <http://haxe.org/doc/advanced/haxe2>.

It may deserve some room within the language references ?
I don't see how one haXe newcomer can be aware of such a feature if it
only exist in a change log.

Tell me where it should be added, I'll be glad to do it.

At the good place in the language reference.


Nicolas

--
haXe - an open source web programming language
http://haxe.org

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

Jan_Flanders


On Fri, Sep 23, 2011 at 3:19 PM, [hidden email] <[hidden email]> wrote:

Also noticed that 

var str="test";
myFunc( str );

public function myFunc( a )
{
trace( Type.typeof( a ) );
}

effectively is implicitly typing a as a string, so you can't call the function later with a number, if this not documented it would be good to add.



Type inference is explained in the manual: http://haxe.org/ref/type_infer?lang=en

Jan

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Runtime error 1053 when trying to use dynamic methods.

bubblebenj
I didn't see either that affecting a dynamic variable to a variable doesn't type it as dynamic but as the type of its content.

So what type is inferred if the dynamic variable has not been initialized ? untyped or any ?

Ben

On Fri, Sep 23, 2011 at 3:35 PM, Jan Flanders <[hidden email]> wrote:


On Fri, Sep 23, 2011 at 3:19 PM, [hidden email] <[hidden email]> wrote:

Also noticed that 

var str="test";
myFunc( str );

public function myFunc( a )
{
trace( Type.typeof( a ) );
}

effectively is implicitly typing a as a string, so you can't call the function later with a number, if this not documented it would be good to add.



Type inference is explained in the manual: http://haxe.org/ref/type_infer?lang=en

Jan

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org