Haxe 2.07 ¿Bug with swhx?

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

Haxe 2.07 ¿Bug with swhx?

Symphonicmind
Hi to all...
well I basically ended up to choose to do my Desktop app with haxe/swhx.
I did the example given on the web page, I corrected the mistaken line on Plugin.hx and everything went "perfect" while compiling.
Then I realize that opening the app no red square was showing....I did this on a Windows XP Virtual Machine under Linux..so then I got the example on a different machine to discard something was wrong with the VM but I got the same results....
Then I found I had somewhere a haxe 2.06 version and I replaced the 2.07 with that one...
BINGO!!! now I see the red square...
So should I make the app under haxe 2.06?
Does anyone has a solution with 2.07?

Thanks guys


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

Re: Haxe 2.07 ¿Bug with swhx?

Alex Liebert
can you post your exact code so we can analyze?

thanks, alex

On Tue, Feb 15, 2011 at 7:22 PM, Symphonicmind <[hidden email]> wrote:
Hi to all...
well I basically ended up to choose to do my Desktop app with haxe/swhx.
I did the example given on the web page, I corrected the mistaken line on Plugin.hx and everything went "perfect" while compiling.
Then I realize that opening the app no red square was showing....I did this on a Windows XP Virtual Machine under Linux..so then I got the example on a different machine to discard something was wrong with the VM but I got the same results....
Then I found I had somewhere a haxe 2.06 version and I replaced the 2.07 with that one...
BINGO!!! now I see the red square...
So should I make the app under haxe 2.06?
Does anyone has a solution with 2.07?

Thanks guys


--
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: Haxe 2.07 ¿Bug with swhx?

Symphonicmind
Is exactly the same that is on the website:
// App.hx
class App {
static function main() {
swhx.Application.init();
var window = new swhx.Window("My Application",400,300);
var context = new haxe.remoting.Context();
var flash = new swhx.Flash(window,context);
flash.setAttribute("src","ui.swf");
flash.start();
window.visible = true;
swhx.Application.loop();
swhx.Application.cleanup();
}
}
// Flash.hx
class Flash {
static function main() {
var mc = flash.Lib.current;
mc.moveTo(10,10);
mc.beginFill(0xFF0000,100);
mc.lineTo(100,10);
mc.lineTo(100,100);
mc.lineTo(10,100);
mc.endFill();
}
}

// App.hxml
-main App
-neko app.n
-lib swhx

--next
-main Flash
-swf ui.swf
-swf-header 400:300:20:EEEEFF
-lib swhx

Thanks
On Wed, Feb 16, 2011 at 12:46 AM, Alex Liebert <[hidden email]> wrote:
can you post your exact code so we can analyze?

thanks, alex

On Tue, Feb 15, 2011 at 7:22 PM, Symphonicmind <[hidden email]> wrote:
Hi to all...
well I basically ended up to choose to do my Desktop app with haxe/swhx.
I did the example given on the web page, I corrected the mistaken line on Plugin.hx and everything went "perfect" while compiling.
Then I realize that opening the app no red square was showing....I did this on a Windows XP Virtual Machine under Linux..so then I got the example on a different machine to discard something was wrong with the VM but I got the same results....
Then I found I had somewhere a haxe 2.06 version and I replaced the 2.07 with that one...
BINGO!!! now I see the red square...
So should I make the app under haxe 2.06?
Does anyone has a solution with 2.07?

Thanks guys


--
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: Haxe 2.07 ¿Bug with swhx?

Nemea Lion
The problem is, you are using Flash7 (as2) API, and it seems
the compiler now defaults to compile Flash9+ (as3) swf's.

I'd tought that the compiler would check if the api is valid
for the version of flash being compiled, but it seems in this
case it doesn't. I don't have 2.06 handy to test, but I'll asume
that it defaults to compile Flash7(as2).

I also tested, that with that code, even if you specify
-swf-version 9, the compiler compiles just fine.

2011/2/16 Symphonicmind <[hidden email]>:

> Is exactly the same that is on the website:
>
> // App.hx
> class App {
>     static function main() {
>
>         swhx.Application.init();
>         var window = new swhx.Window("My Application",400,300);
>
>         var context = new haxe.remoting.Context();
>         var flash = new swhx.Flash(window,context);
>
>         flash.setAttribute("src","ui.swf");
>         flash.start();
>
>         window.visible = true;
>         swhx.Application.loop();
>         swhx.Application.cleanup();
>
>     }
> }
>
> // Flash.hx
> class Flash {
>     static function main() {
>
>         var mc = flash.Lib.current;
>         mc.moveTo(10,10);
>
>         mc.beginFill(0xFF0000,100);
>         mc.lineTo(100,10);
>
>         mc.lineTo(100,100);
>         mc.lineTo(10,100);
>
>         mc.endFill();
>     }
> }
>
> // App.hxml
>
> -main App
> -neko app.n
> -lib swhx
>
> --next
> -main Flash
> -swf ui.swf
> -swf-header 400:300:20:EEEEFF
> -lib swhx
>
> Thanks
>
> On Wed, Feb 16, 2011 at 12:46 AM, Alex Liebert <[hidden email]>
> wrote:
>>
>> can you post your exact code so we can analyze?
>> thanks, alex
>>
>> On Tue, Feb 15, 2011 at 7:22 PM, Symphonicmind <[hidden email]>
>> wrote:
>>>
>>> Hi to all...
>>> well I basically ended up to choose to do my Desktop app with haxe/swhx.
>>> I did the example given on the web page, I corrected the mistaken line on
>>> Plugin.hx and everything went "perfect" while compiling.
>>> Then I realize that opening the app no red square was showing....I did
>>> this on a Windows XP Virtual Machine under Linux..so then I got the example
>>> on a different machine to discard something was wrong with the VM but I got
>>> the same results....
>>> Then I found I had somewhere a haxe 2.06 version and I replaced the 2.07
>>> with that one...
>>> BINGO!!! now I see the red square...
>>> So should I make the app under haxe 2.06?
>>> Does anyone has a solution with 2.07?
>>>
>>> Thanks guys
>>>
>>>
>>> --
>>> 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
>

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