On Dec 14, 11:32 pm, Rayservers <[email protected]> wrote:
> Hi Leslie and Ian,
>
> Thank you both for your clarifications.

Sorry for the delay. Everyone seems to be ravaging the subject lines
these
days which confuses the hell out of me.


> It seems then, that the crucial advantage is that one can write a bunch of
> simple widgets and use the continuation code to keep track of how the user 
> walks
> through them**. This frees up the programmer from having to create a super
> widget (what I did) that stores the state in the class instance and the render
> methods get complex.

It really depends on your particular needs but that does sound like
it, yeah.


> Now, one of the things I needed to figure out, is how to refresh the widget 
> tree
> when one widget changes something like login state in an AJAX call. The login
> widget I wrote seemed to be fine regarding AJAX as the navigation was already 
> built.

Are you talking about bug #6?

http://bitbucket.org/S11001001/weblocks-dev/issue/6/change-in-navigation-structure-is-not-considered-on-ajax


> ** Is there an example of this somewhere?

Of what exactly?


> So then the continuation parameter that is passed on in the continuation is
> the previous widget?

Continuations are always functions. Consider:

(require :cl-cont)

(use-package :cl-cont)

(with-call/cc
  (format t "before continuation capture~%")
  (let ((result (let/cc k (funcall k 5))))
    (format t "after continuation capture; result: ~S~%" result)))

K equals

  (lambda (arg)
    (let ((result arg))
      (format t "after continuation capture; result: ~S~%" result)))

Funcalling K inside the LET/CC will work as you expect, resuming
the continuation. If K is not called in the LET/CC it will not be
executed
at all.

  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