Sorry, I think did not explain my question well.  The example you give
works fine as a normal flow, but what I was wondering is if in my
flow, I can replace a widget other than "root-widget".  In my case,
what I want to happen is the following flow:

1) Root-widget appears
2) When the user clicks on submit in root-widget, the ENTIRE PAGE gets
replaced with login-manager
3) When the user logs in in the login-manager, the main-page gets
rendered with make-main-page.

Thanks,
Saikat

On Mar 3, 2:34 am, "Leslie P. Polzer" <[email protected]> wrote:
> On Mar 3, 7:30 am, Saikat Chakrabarti <[email protected]> wrote:
>
> > Is it possible to somehow make the widgets in a with-flow appear in
> > locations other than the widget specified at the start?  For example,
> > if I want to make a flow where clicking submit on a form causes a
> > login-form to appear as a dialog, and then logging in on that dialog
> > causes the original form to be replaced by some other widget, is this
> > possible with a with-flow?  I tried doing something similar with:
>
> >  (with-flow root-widget
> >         (if (yield root-widget)
> >             (if (yield (do-page (make-instance 'login-manager)))
> >                 (yield (make-main-page))))))))
>
> DO-PAGE doesn't return a widget, but YIELD expects it to.
>
> Try this:
>
>   (with-flow root-widget
>          (if (yield root-widget)
>              (if (yield (make-instance 'login-manager))
>                  (yield (make-main-page))
>                  (yield (make-other-page))))))))
>
> And let LOGIN-MANAGER call ANSWER with T if you want the
> main page next and NIL if you want the other page next.
>
> Of course you can make even more distinctions as needed.
>
> Let me know if it's clear to you now and I will help you to understand
> what's going on.
--~--~---------~--~----~------------~-------~--~----~
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