On Aug 29, 10:17 am, timor <[email protected]> wrote:
> > First a hint: don't rely on the return value of DO-PAGE. The DO
> > functions are
> > not really supposed to return a sensible value. So I recommend that
> > you use
> > them in a procedural context.
>
> Is there a built-in way to have functional contexts?
I'm not sure what you mean here.
> 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.
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.
Let me know if you still need a modal dialog example.
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.
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
-~----------~----~----~----~------~----~------~--~---