Update

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

Update

Nicolas Cannasse
Hi,

A few new things on SVN :

- support for named local functions :
        public function foo() {
                function bla() {
                }
        }
    which is compiled as var bla = function() { },
    with the difference that the function body can reference itself.
    This is a shortcut for the pattern :
        var bla = null;
        bla = function() ....;

- @:build support for classes, see updated documentation here
http://haxe.org/manual/macros

- documented --macro, read http://haxe.org/manual/macros_compiler

haXe 2.07 should be released this week end if everything goes fine.

Enjoy,
Nicolas

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

Re: Update

Simon Krajewski
  Am 25.01.2011 13:15, schrieb Nicolas Cannasse:
> - @:build support for classes, see updated documentation here
> http://haxe.org/manual/macros
That sounds really useful, I will check it out later. Could this feature
be used to create proxies like haxe.remoting.AsyncProxy?

Simon

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

RE: Update

Lee Sylvester
In reply to this post by Nicolas Cannasse
Excellent stuff. Is there a list of current new features in SVN compared to
2.06?

Thanks,
Lee



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nicolas Cannasse
Sent: 25 January 2011 12:15
To: The haXe compiler list
Subject: [haXe] Update

Hi,

A few new things on SVN :

- support for named local functions :
        public function foo() {
                function bla() {
                }
        }
    which is compiled as var bla = function() { },
    with the difference that the function body can reference itself.
    This is a shortcut for the pattern :
        var bla = null;
        bla = function() ....;

- @:build support for classes, see updated documentation here
http://haxe.org/manual/macros

- documented --macro, read http://haxe.org/manual/macros_compiler

haXe 2.07 should be released this week end if everything goes fine.

Enjoy,
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: Update

Baluta Cristian
Any change made to Xml?
I have a localization xml like: <t id="x">xxxxxx</t>

Then:

var xml = Xml.parse( e.target.data ).firstElement();
// iterate over words
for (e in xml.elements()) {
try{set (e.get("id"), e.nodeValue);}catch(e:Dynamic){trace(e);}
}

And i get "bad nodeType" exception for each nodeValue. I have a build from yesterday.


On Tue, Jan 25, 2011 at 2:57 PM, Lee Sylvester <[hidden email]> wrote:
Excellent stuff. Is there a list of current new features in SVN compared to
2.06?

Thanks,
Lee



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nicolas Cannasse
Sent: 25 January 2011 12:15
To: The haXe compiler list
Subject: [haXe] Update

Hi,

A few new things on SVN :

- support for named local functions :
       public function foo() {
               function bla() {
               }
       }
   which is compiled as var bla = function() { },
   with the difference that the function body can reference itself.
   This is a shortcut for the pattern :
       var bla = null;
       bla = function() ....;

- @:build support for classes, see updated documentation here
http://haxe.org/manual/macros

- documented --macro, read http://haxe.org/manual/macros_compiler

haXe 2.07 should be released this week end if everything goes fine.

Enjoy,
Nicolas

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


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



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

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

Re: Update

Nicolas Cannasse
Le 25/01/2011 15:04, Baluta Cristian a écrit :

> Any change made to Xml?
> I have a localization xml like: <t id="x">xxxxxx</t>
>
> Then:
>
> var xml = Xml.parse( e.target.data ).firstElement();
> // iterate over words
> for (e in xml.elements()) {
> try{set (e.get("id"), e.nodeValue);}catch(e:Dynamic){trace(e);}
> }
>
> And i get "bad nodeType" exception for each nodeValue. I have a build
> from yesterday.

Could you specify on which platform and give a complete example without
external file ?

Nicolas

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

Re: Update

Baluta Cristian
I'm compiling to flash9, and here is the simplest example:


On Tue, Jan 25, 2011 at 4:08 PM, Nicolas Cannasse <[hidden email]> wrote:
Le 25/01/2011 15:04, Baluta Cristian a écrit :

Any change made to Xml?
I have a localization xml like: <t id="x">xxxxxx</t>

Then:

var xml = Xml.parse( e.target.data ).firstElement();
// iterate over words
for (e in xml.elements()) {
try{set (e.get("id"), e.nodeValue);}catch(e:Dynamic){trace(e);}
}

And i get "bad nodeType" exception for each nodeValue. I have a build
from yesterday.

Could you specify on which platform and give a complete example without external file ?


Nicolas

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



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

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

TestLocalization.hx (898 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Update

Simon Krajewski
In reply to this post by Simon Krajewski
  Am 25.01.2011 13:27, schrieb Simon Krajewski:
>  Am 25.01.2011 13:15, schrieb Nicolas Cannasse:
>> - @:build support for classes, see updated documentation here
>> http://haxe.org/manual/macros
> That sounds really useful, I will check it out later. Could this
> feature be used to create proxies like haxe.remoting.AsyncProxy?
Answer: yes, this works fine. I found it inconvenient to work with the
different kind of argument arrays for TFun, ECall and EFunction, so I
(again) ended up using Context.parse alot.

How about making a macro snippets page on the wiki where people can post
some of their macros? Providing some examples might help to improve
general macro understanding.

Simon

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

Re: Update

Nicolas Cannasse
In reply to this post by Baluta Cristian
Le 25/01/2011 15:33, Baluta Cristian a écrit :
> I'm compiling to flash9, and here is the simplest example:

This is perfectly normal : you can't read the nodeValue of an Element.
Use firstChild() to access the inner PCData element and read its nodeValue.

Nicolas

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

Re: Update

Jordo Odroj
In reply to this post by Nicolas Cannasse
You rock. Thanks.

On Tue, Jan 25, 2011 at 4:15 AM, Nicolas Cannasse <[hidden email]> wrote:
Hi,

A few new things on SVN :

- support for named local functions :
       public function foo() {
               function bla() {
               }
       }
  which is compiled as var bla = function() { },
  with the difference that the function body can reference itself.
  This is a shortcut for the pattern :
      var bla = null;
      bla = function() ....;

- @:build support for classes, see updated documentation here http://haxe.org/manual/macros

- documented --macro, read http://haxe.org/manual/macros_compiler

haXe 2.07 should be released this week end if everything goes fine.

Enjoy,
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: Update

Baluta Cristian
Thanks, it works that way. I'm totally offtopic, but i observed that if my elements ids contains capitalizations the Proxy gives me null values, does not complain: RCLocalization.list.butStartNow
This will work instead: RCLocalization.list.butstartnow
Do you think i badly implemented the Proxy?

On Wed, Jan 26, 2011 at 11:48 AM, Jordo Odroj <[hidden email]> wrote:
You rock. Thanks.


On Tue, Jan 25, 2011 at 4:15 AM, Nicolas Cannasse <[hidden email]> wrote:
Hi,

A few new things on SVN :

- support for named local functions :
       public function foo() {
               function bla() {
               }
       }
  which is compiled as var bla = function() { },
  with the difference that the function body can reference itself.
  This is a shortcut for the pattern :
      var bla = null;
      bla = function() ....;

- @:build support for classes, see updated documentation here http://haxe.org/manual/macros

- documented --macro, read http://haxe.org/manual/macros_compiler

haXe 2.07 should be released this week end if everything goes fine.

Enjoy,
Nicolas

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


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



--
Băluță Cristian
http://ralcr.com
http://imagin.ro

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

Re: Update

Nicolas Cannasse
In reply to this post by Nicolas Cannasse
Le 25/01/2011 13:15, Nicolas Cannasse a écrit :
> - @:build support for classes, see updated documentation here
> http://haxe.org/manual/macros

I have updated the documentation with the following changes :

- modifiers and properties declarations in @:build macros
- @:autoBuild for user-transparent building of classes

Best,
Nicolas

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