Newbie, problems with haXe

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

Newbie, problems with haXe

Andreas Romeyke-3
Dear all,

I am very new with haXe. Because I have to write small applications for
different targets I will give HaXe a try.

Here my questions:

1. It seems to me, that mostly all haXe-users deny the possibility to
develop for crossplattform targets and prefer haXe as a flash compiler.
Because I did not found any documentation to clear a screen or move
objects in a non-flash specific way. Please could you send me some
informations/links?

2. I tried to compile testexample of physaxe library. But the
haxe-compiler breaks with
"/usr/local/lib/haxe/lib/physaxe/1,2/phx/Body.hx:148: characters 8-15 :
Unexpected dynamic". What was the reason for? (More details see:
http://code.google.com/p/physaxe/issues/detail?id=4)

3. Is it necessary to write data to a file without targeting to specific
platform? Could you send me an example, please?

Thanks in advance

Bye Andreas

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

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie, problems with haXe

Ian Martins
Andreas Romeyke wrote:

> Dear all,
>
> I am very new with haXe. Because I have to write small applications for
> different targets I will give HaXe a try.
>
> Here my questions:
>
> 1. It seems to me, that mostly all haXe-users deny the possibility to
> develop for crossplattform targets and prefer haXe as a flash compiler.
> Because I did not found any documentation to clear a screen or move
> objects in a non-flash specific way. Please could you send me some
> informations/links?
>  
if you're talking about creating a graphics window you should look at
the neash library.
> 3. Is it necessary to write data to a file without targeting to specific
> platform? Could you send me an example, please?
>  
haxe.io and neko.io are crossplatform. the following should work on any
platform on which neko runs.  (unless I made a syntax error or
something, I didn't test it)
--
var fout = neko.io.File.write("somefile.txt", false);
fout.writeString("test");




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

Re: Newbie, problems with haXe

jmgens
what are the platforms you invoke ?
Ian Martins a écrit :

> Andreas Romeyke wrote:
>> Dear all,
>>
>> I am very new with haXe. Because I have to write small applications for
>> different targets I will give HaXe a try.
>> Here my questions:
>>
>> 1. It seems to me, that mostly all haXe-users deny the possibility to
>> develop for crossplattform targets and prefer haXe as a flash compiler.
>> Because I did not found any documentation to clear a screen or move
>> objects in a non-flash specific way. Please could you send me some
>> informations/links?
>>  
> if you're talking about creating a graphics window you should look at
> the neash library.
>> 3. Is it necessary to write data to a file without targeting to specific
>> platform? Could you send me an example, please?
>>  
> haxe.io and neko.io are crossplatform. the following should work on
> any platform on which neko runs.  (unless I made a syntax error or
> something, I didn't test it)
> --
> var fout = neko.io.File.write("somefile.txt", false);
> fout.writeString("test");
>
>
>
>

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

jeanmichel_gens.vcf (114 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie, problems with haXe

Andreas Romeyke-3
In reply to this post by Ian Martins
Hello,

Am Thu, 05 Feb 2009 11:53:16 -0500
schrieb Ian Martins <[hidden email]>:

> > 3. Is it necessary to write data to a file without targeting to
> > specific platform? Could you send me an example, please?

> haxe.io and neko.io are crossplatform. the following should work on
> any platform on which neko runs.  (unless I made a syntax error or
> something, I didn't test it)
> --
> var fout = neko.io.File.write("somefile.txt", false);
> fout.writeString("test");

If I use this, I have got
"src/TwoCAT.hx:156: characters 13-31 : You can't access the neko package
with current compilation flags"

The code looks like:

        private function writeLog () {
                var file = neko.io.File.write("/tmp/erg.txt", false);
                file.writeString( "blubberblase" );
                file.flush();
                file.close();
        }

The code will be compiled with:

haxe -main TwoCAT -cp lib -cp src --flash-strict -swf-version 9
-swf-header 650:350:100:000000 -swf bin/TwoCAT.swf --next -main TwoCAT
-cp lib -cp src -js bin/TwoCAT.js

The library "haxe.io" does not exist on my system. Where could I get?

Bye Andreas

--
Software Developer / Dipl. Inform. (FH)
Max Planck Institute for Human Cognitive and Brain Sciences
Department of Psychology
Stephanstr. 1a, 04103 Leipzig, Germany


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

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie, problems with haXe

Andreas Romeyke-3
In reply to this post by jmgens
Hello,

Am Fri, 06 Feb 2009 09:50:36 +0100
schrieb jmgens <[hidden email]>:

> what are the platforms you invoke ?

from OS view, it will be Linux and MS Win Xp
from binary view, it should be compiled to flash, js or php.

I am evaluating haXe as a basic language to design computer-based
experiments, such like "presentation"¹ and similar does. The problem is
that we need easy to install binaries, accurate timings, a powerful
language and possibility to adress different targets.

Because haXe.org promises the possibility to make binaries for
different runtime-platforms and fulfills all other requests, I am
trying to compile simple experiments and test if haXe will be the right
tool for us.

Bye Andreas

--
Software Developer / Dipl. Inform. (FH)
Max Planck Institute for Human Cognitive and Brain Sciences
Department of Psychology
Stephanstr. 1a, 04103 Leipzig, Germany


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

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie, problems with haXe

Benjamin Dasnois
Hello Andreas,

According to the the needs you expressed here, you should definitely
have a look at neash.
The goal of this library is to allow one to manipulate graphics in the
same way on neko and Flash9. You should still do some testing since I
think that sometimes it doesn't exactly behave in the same way but
that would help.

Also keep in mind that haxe.io is available on all targets but not
neko.io (in fact the whole neko package is only available when
compiling to the neko target).

Regards,

On Fri, Feb 6, 2009 at 10:29 AM, Andreas Romeyke <[hidden email]> wrote:

> Hello,
>
> Am Fri, 06 Feb 2009 09:50:36 +0100
> schrieb jmgens <[hidden email]>:
>
>> what are the platforms you invoke ?
>
> from OS view, it will be Linux and MS Win Xp
> from binary view, it should be compiled to flash, js or php.
>
> I am evaluating haXe as a basic language to design computer-based
> experiments, such like "presentation"¹ and similar does. The problem is
> that we need easy to install binaries, accurate timings, a powerful
> language and possibility to adress different targets.
>
> Because haXe.org promises the possibility to make binaries for
> different runtime-platforms and fulfills all other requests, I am
> trying to compile simple experiments and test if haXe will be the right
> tool for us.
>
> Bye Andreas
>
> --
> Software Developer / Dipl. Inform. (FH)
> Max Planck Institute for Human Cognitive and Brain Sciences
> Department of Psychology
> Stephanstr. 1a, 04103 Leipzig, Germany
>
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



--
DASNOIS Benjamin
http://www.benjamindasnois.com

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

Re: Newbie, problems with haXe

Franco Ponticelli
Maybe you don't have the haxe.io package because you are using a older (pre 2.0) version of haxe.
Franco.

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

Re: Newbie, problems with haXe

Andreas Romeyke-3
Hello

Am Fri, 6 Feb 2009 10:32:30 +0000
schrieb Franco Ponticelli <[hidden email]>:

> Maybe you don't have the haxe.io package because you are using a
> older (pre 2.0) version of haxe.Franco.

jep, I upgraded to 2.02 yet.

Bye Andreas
--
Software Developer / Dipl. Inform. (FH)
Max Planck Institute for Human Cognitive and Brain Sciences
Department of Psychology
Stephanstr. 1a, 04103 Leipzig, Germany


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

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie, problems with haXe

Ian Martins
In reply to this post by Andreas Romeyke-3
Andreas Romeyke wrote:

> Hello,
>
> Am Thu, 05 Feb 2009 11:53:16 -0500
> schrieb Ian Martins <[hidden email]>:
>
>  
>> haxe.io and neko.io are crossplatform. the following should work on
>> any platform on which neko runs.  (unless I made a syntax error or
>> something, I didn't test it)
>> --
>> var fout = neko.io.File.write("somefile.txt", false);
>> fout.writeString("test");
>>    
>
> If I use this, I have got
> "src/TwoCAT.hx:156: characters 13-31 : You can't access the neko package
> with current compilation flags"
haxe can compile to multiple targets, and multiple platforms.  the code
above is written for the neko target, which is a vm that will run on the
windows, linux, and mac platforms.  I don't think flash or js allow file
access like this.

oh, and I forgot there should be a "fout.close();" at the end



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