I don't have any ideas off the top of my head, but it does do a lot of
stuff, including I/O to the screen. I imagine
the player's array sort function is hardcoded in C or something for speed,
and maybe it just isn't set up to allow callbacks to
the flash display subsystem.


On Jan 9, 2008 3:00 PM, Pablo Kang <[EMAIL PROTECTED]> wrote:

> Ah, looks like it does! Weird. Any ideas why? Thanks.
>
> On Wed, 9 Jan 2008, Henry Minsky wrote:
>
> > I think the call to Debug.write is killing it.
> >
> >
> >
> > On Jan 9, 2008 2:28 PM, Pablo Kang <[EMAIL PROTECTED]> wrote:
> >
> >> Btw, I know that I can call a laszloMethod from a Javascript function
> >> like:
> >>
> >>   <method name="javascriptFunction" args="n1,n2">
> >>       return canvas.laszloMethod(n1,n2);
> >>   </method>
> >>
> >> What I want to know is why it is I can't pass in the the laszloMethod
> >> directly.
> >>
> >> Thanks,
> >> pablo
> >>
> >> On Wed, 9 Jan 2008, Pablo Kang wrote:
> >>
> >>> Anyone know why passing in a function defined with an LZX method tag
> >> into
> >>> Array.sort doesn't work? Here's a test case:
> >>>
> >>> <canvas debug="true">
> >>>
> >>>    <method name="laszloMethod" args="n1,n2">
> >>>        Debug.write('laszloMethod(', n1, ',', n2, ')');
> >>>        return 0;
> >>>    </method>
> >>>
> >>>    <script>
> >>>        function javascriptFunction(n1,n2) {
> >>>            Debug.write('javascriptFunction(', n1, ',', n2 ,')');
> >>>            return 0;
> >>>        }
> >>>    </script>
> >>>
> >>>    <handler name="oninit">
> >>>        var arr = [ 1,2,3 ];
> >>>
> >>>        Debug.write('-- Javascript Function --');
> >>>        arr.sort( javascriptFunction );
> >>>
> >>>        Debug.write('-- Laszlo Method --------');
> >>>        arr.sort( canvas.laszloMethod );
> >>>    </handler>
> >>>
> >>> </canvas>
> >>>
> >>> pablo
> >>>
> >>>
> >>>
> >>
> >
> >
> >
> > --
> > Henry Minsky
> > Software Architect
> > [EMAIL PROTECTED]
> >
>



-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to