@haxe gurus: Cannot @:bind private class ?

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

@haxe gurus: Cannot @:bind private class ?

Mihail Ivanchev
Good evening guys,

I am experiencing a weird issue, I have:

@:bind
private class Stuff extends MovieClip

Which should bind Stuff to a MovieClip Stuff loaded via an SWF. This is not the case though, I get NO error, NO warning whatsoever, but Stuff is an empty MovieClip when instantiated. When I change private to public, everything works and the classes are bound. Is this supposed to be like that?

Thanks!

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

Re: @haxe gurus: Cannot @:bind private class ?

Nicolas Cannasse
Le 09/10/2011 20:33, Mihail Ivanchev a écrit :

> Good evening guys,
>
> I am experiencing a weird issue, I have:
>
> @:bind
> private class Stuff extends MovieClip
>
> Which should bind Stuff to a MovieClip Stuff loaded via an SWF. This is
> not the case though, I get NO error, NO warning whatsoever, but Stuff is
> an empty MovieClip when instantiated. When I change private to public,
> everything works and the classes are bound. Is this supposed to be like
> that?

private classes are put into a specific package ( _MyClass if you're in
MyClass.hx). Try adding @:native to it :

@:bind @:native("Stuff") class Stuff ...

BEst,
Nicolas


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

Re: @haxe gurus: Cannot @:bind private class ?

Mihail Ivanchev
Magic! Thanks & nice evening!

Regards,
Mihail

On Sun, Oct 9, 2011 at 11:52 PM, Nicolas Cannasse <[hidden email]> wrote:
Le 09/10/2011 20:33, Mihail Ivanchev a écrit :

Good evening guys,

I am experiencing a weird issue, I have:

@:bind
private class Stuff extends MovieClip

Which should bind Stuff to a MovieClip Stuff loaded via an SWF. This is
not the case though, I get NO error, NO warning whatsoever, but Stuff is
an empty MovieClip when instantiated. When I change private to public,
everything works and the classes are bound. Is this supposed to be like
that?

private classes are put into a specific package ( _MyClass if you're in MyClass.hx). Try adding @:native to it :

@:bind @:native("Stuff") class Stuff ...

BEst,
Nicolas


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


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