On Jan 31, 2:54 pm, Benjamin Collins <[email protected]> wrote:
> On Jan 31, 5:31 am, "Leslie P. Polzer" <[email protected]> wrote:
>
> > Seems plain enough to me:
>
> >           (when (and (ajax-request-p)
> >                      (flash-old-messages obj))
> >           ;; FX stuff
>
> > Your code snippet doesn't allow for any AJAX reqs.

I think you misunderstood me here (and I can hardly blame
you for it).

What I meant was: pulsate/blindup only fire on an AJAX request
(which is what the above snippet demonstrates) and you don't
have any AJAX requests in your test application.


> The snippet I pasted before is the :post-action hook.  If it doesn't
> allow ajax requests, then I'm afraid I don't understand what the :post-
> action hook is for.  In other words, when would it ever be executed?

Hooks are executed in handle-client-request, a function from
src/request-handler.lisp.


> To me it looks like it would be when it's an ajax request and there
> are old-message (which doesn't make sense to me, even if I were
> right).

The code from above installs a post-action hook. This means that
the code inside the lambda gets executed on every request, AJAX
or not.

The WHEN inside the lambda however requires two conditions
for its body to execute:

  1. There are new flash messages.*

  2. We're in an AJAX request.

---
* The name "old-messages" is highly misleading here

The variable actually gets filled with the *current* flash messages
in the pre-action hook.
---

I hope I got the important points across better this time. :)


> Chrome complains about this: "Uncaught TypeError: Ojbect [object
> HTMLDivElement] has no method 'show'"

Thanks, I'm going to file this as a bug. Not sure where SHOW
is supposed to come from...

  Leslie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" 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/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to