On Mon, 13 Jul 2009 20:07:52 +0200
Nicolas Petton <[email protected]> wrote:

> Hmm, yes. As far as I remember, numbers are needed to know in which
> order actions need to be executed, in a form for instance.
> 
> But I don't think you need Session>>nextId, it is mostly used for
> actions registration. You could use Iliad.Id instead.

Channeling my youngest kid:

butbutbut ... you *told* me I could use *either* of them ... sniff

My reasoning was that after looking at both implementations, I decided
to go with the shorter :-)

> 
> Also, #nextId may not be the appropriate name, since it answers an
> integer. If someone has a better name in mind...

if that's the purpose, why not call it #nextActionIndex?

> > Question #2:
> > The solution above nicely logs the expected XHR requests in firebug.
> > When I tried 
> >             Iliad.evaluteAnchorAction( "a#' , id , '" );
> > instead, no such requests were logged. Do I actually go and read
> > the Javascript books on the shelf behind me or is there something
> > else I'm not aware of?
> 
> Iliad.evaluateAnchorAction(anchor) expects a DOM element, not an id. 
> So Iliad.evaluateAnchorAction(jQuery(#someId)) should work.

... and it does, great!

This means I'll skip the general javascript and give the jQuery docs
a thorough reading instead. Looking at the implementation of 
evaluateAnchorAction led me to my erroneous belief.

    evaluateAnchorAction: function(anchor) {
        var actionUrl = jQuery(anchor).attr('href');
        this.evaluateAction(actionUrl);
    },

hmmm.... final question: How would I do this without putting an anchor
into my page? I guess I'd have to do some work to gather the expected
session tokens and whatever else is required?

Thanks,
s.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to