Re: [flexcoders] var myVar : Function = new Function ? examples?

2010-05-21 Thread Kerry Jordan
On Thu, May 20, 2010 at 6:22 AM, Nick Middleweek n...@middleweek.co.uk wrote: I was going to use the approach for my URLLoader complete event handler function, I was hoping to keep things a bit neater and just pass the .data through to my Cairngorm Command. We implemented something similar

[flexcoders] var myVar : Function = new Function ? examples?

2010-05-20 Thread Nick Middleweek
Hello, I can't find any examples on how to create Functon variables? Does anyone have any to hand please? Thanks, Nick -- Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: http://blog.middleweek.co.uk } );

Re: [flexcoders] var myVar : Function = new Function ? examples?

2010-05-20 Thread Oleg Sivokon
You cannot construct a function like that. What you can do is more like this: var f : Function = function (arguments) : Type { function body }

Re: [flexcoders] var myVar : Function = new Function ? examples?

2010-05-20 Thread Nick Middleweek
ok, thanks Oleg... I was going to use the approach for my URLLoader complete event handler function, I was hoping to keep things a bit neater and just pass the .data through to my Cairngorm Command. What are your thoughts on the idea? something like this... private funtion

Re: [flexcoders] var myVar : Function = new Function ? examples?

2010-05-20 Thread Oleg Sivokon
Neva! :D Just never use anonymous functions in AS3, they are badly implemented and, they aren't truly anonymous. You cannot design a first order functions in ECMAScript languages, nada!, whatever anyone is going to say about that :) Simply give it a normal method, this is the simplest and the