On 29 Aug., 12:45, "Leslie P. Polzer" <[email protected]> wrote:
> > Is there a built-in way to have functional contexts?
>
> I'm not sure what you mean here.
I meant relying on the return value, for the given problem.

> > As I am still trying to understand the whole thing I am not really
> > sure what your questions are targeted at.
> > I browsed through the group a bit already, and also read the
> > documentation in the source code to a large degree, but i never found
> > any comprehensive description of the do-page/do-widget concept with
> > continuations, neither a tutorial that goes beyond the examples which
> > are provided with weblocks.
>
> > perhaps someone could point me in the direction of the Correct Way(TM)
> > of implementing the solution to the desired behavior in the first
> > post, or since that was supposed to be an exercise in using "modal"
> > behaviour, how would one so this with the dialog facility?
>
> You don't need continuations at all to implement the behavior above,
> and no flash widget either -- which is fortunate because you will have
> a hard time diving in with continuation tech right away.
which was my primary goal to understand and make use of by diving into
weblocks, though. I think I'd rather invest some hard time diving into
the continuation tech, but i don't really know where to start, other
than reading source code documentation.

> Untested sketch:
>
> (defun make-documents-page (target)
>   (let* ((yes-widget (f0 "yes"))
>          (no-widget (f0 "yes"))
>          (welcome-widget (f0
>                            (with-html
>                              (:p "flash!"))
>                            (render-link (f_%
>                                           (setf (widget-children
> target)
>                                                 (list yes-widget)))
>                                         "you bet!")
>                            (render-link (f_%
>                                           (setf (widget-children
> target)
>                                                 (list no-widget)))
>                                         "never ever!"))))
>     (lambda ()
>       (render-link (f_%
>                      (setf (widget-children target)
>                            (list welcome-widget)))
>                    "start the test dialog"))))
>
> (defun init-user-session (root)
>   (setf (widget-children root)
>         (list (make-documents-page root))))
>
> Basically you just manipulate children lists. The DO functions perform
> the same
> but give you a continuation context in addition.

Thanks for the example.
Looking at it, however, feels like taking a step backwards without
looking forward again, since the first version of my initial example
was already working, needed less code, and somehow felt more natural
to me.

> Let me know if you still need a modal dialog example.
would be nice, since this was my original intent, specifically, a kind
of "dialog flow" where the user answers several questions in sequence.
> I think you don't want to use the flash widget in any case. It's
> designed to
> show a more or less static display, not to make complex interaction
> possible.
> And the flash widget complicates things further because it does a
> bunch
> of magic.
I used the flash widget merely as means to display something,
basically as not-so-complex interaction. I didn't know it was that
complicated under the hood.

Thanks for your time

Martin

--~--~---------~--~----~------------~-------~--~----~
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