On 5 Jun 2006, at 02:31, Scott Anderson wrote:

> You have to make sure to trap both successes and failures in the
> Javascript code -- I don't know how mochikit does that, but with
> prototype you need to specify an onFailure hook to get errors.

MochiKit models its async stuff on Twisted deferreds - which means  
MochiKit callbacks end up looking like this:

var d = loadJSONDoc("example.json");
d.addCallback(gotDocument);
d.addErrback(logError);

You can also 'chain' callbacks and errbacks, which lets you do some  
really interesting things.

Cheers,

Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to