On 10/17/06, Chris <[EMAIL PROTECTED]> wrote:
>
> Bob Ippolito wrote:
>
> > This is the same problem you had last week. Your code is doing this,
> > which makes no sense:
>
> I thought about that but didn't see it as the same thing. I think I'm
> getting tripped up on the syntax.
>
> I thought "initialize" was already a function considering
> '"initialize": function () {". I didn't think there was any difference
> between having no arguments and having arguments.
>
> When I see...
>
> var something = function () {...};
>
> ...am I not actually seeing a function declaration?
>
> If sortableManager.initialize doesn't return anything I don't
> understand why adding an argument to its declaration makes such a huge
> difference. With or without an argument the
> function/method/property/what-it's-called is not returning anything.
> That's why I thought passing an argument to it wouldn't make a
> difference.You're missing the point entirely. addLoadEvent takes a *function* as an argument, and you're passing in the *result* of a function call. When you call a function, it gets executed immediately... it doesn't wait until later to call it just because it's an argument to addLoadEvent. JavaScript does not have macros or lazy evaluation. -bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~----------~----~----~----~------~----~------~--~---
