Ok here is the code that works for me.

http://paste.lisp.org/+1YAP

The basic rule is that you cannot make-navigation or any of its family
in an ajax call. Weblocks does not know where it is when you do this,
thus the base-uri error.

If you need more let me know and I will clean up the #weblocks logs ans
post it.





On Wed, 2009-11-25 at 17:00 +0000, Rayservers wrote:
> I have to report back... the code when ported back to my application/project
> behaves in exactly the same way as what I wrote originally - complains about
> base-uri and upon a refresh it works (I had not tried a refresh earlier). I
> suspect its something to do with composite widgets. Perhaps I need to set the
> root-composite before make-navigation gets called.
> 
> Cheers,
> 
> ---Venkat.
> 
> On 11/25/09 02:15, Ray Servers wrote:
> > Hi Phil,
> > 
> > Yes, I ended up un-knotting myself...
> > 
> > http://paste.lisp.org/+1Y9O
> > 
> > ...has a hacked layout.lisp that gets the job done.
> > 
> > I will use this as a base for my next step. However I'm still not satisfied 
> > with
> > my comprehension of the login dialog. It should in the end, be much simpler 
> > than
> > this.... something like:
> > 
> > make navigation...
> > 
> > 'protected (logged-in-p
> >                (show-protected-content))
> > 
> > Next step is to protect only, say the companies link.
> > 
> > Is there an archive of the IRC chat somewhere?
> > 
> > ---Venkat.
> > 
> > 
> > On 11/24/09 21:54, Phil Marneweck wrote:
> >> Hi
> >>
> >> I ran into the same thing on the 10th of november and the guys helped me
> >> on the freenode irc #weblocks channel. There were various suggestions
> >> and in the end I got poor leslie to try and explain the whys and
> >> wherefores of the whole issue. I will not attempt relaying the
> >> information because I will inevatably get it wrong on some level.
> >>
> >> I dont know if there is a online archive of the logs some where, but if
> >> you want I can send you the log(s) of the discussion(s). There are a
> >> couple of paste bins and other threads mentioned in the discussion that
> >> also helps.
> >>
> >> Regards
> >>
> >>
> >> On Tue, 2009-11-24 at 19:15 +0000, Rayservers wrote:
> >>> I am running the -dev version of Weblocks.
> >>>
> >>> http://groups.google.com/group/weblocks/browse_thread/thread/51fe560b0a7cc36a
> >>>
> >>> is exactly where I am at. BASE-URI problems in make-navigation. Is there a
> >>> resolution? I had some permutation of my code working at some point, but I
> >>> cannot reproduce it now.
> >>> o
> >>> In this paste:
> >>>
> >>> http://paste.lisp.org/display/90095
> >>>
> >>> I see this code:
> >>>
> >>> (defun init-user-session (comp)
> >>>   (let (proceed)
> >>>     (with-flow comp
> >>>       (yield #'initial-page)
> >>>       (setf (widget-prefix-fn comp) #'render-header)
> >>>       (yield (make-instance 'login
> >>>                       :on-login #'authenticate-user
> >>>                       :on-success (f_%
> >>>                                     (setf proceed t))
> >>>                       :on-cancel (reset-user-session)))
> >>>       (if proceed
> >>>     (yield (make-main-page))
> >>>     (yield (make-login-failed-page))))))
> >>>
> >>> This bit -
> >>>
> >>> :on-success (f_%
> >>> (setf proceed t))
> >>>
> >>> looks like it should be a lambda function. Compiling as-is causes it to of
> >>> course warn about an unknown function. Making it a lambda does not work.
> >>>
> >>> The login I wish to create is a simple form. E-mail field and one button 
> >>> - login
> >>> or register. It then mails a pin and presents the email field and PIN. On
> >>> success, go on to restricted content.
> >>>
> >>> In the process of doing this, I've got my brain tied in knots today.
> >>>
> >>> What is the correct way of using with-flow and friends. The function 
> >>> yield is
> >>> part of the with-flow construct, it seems.  The do-login 
> >>> continuation-function
> >>> seems to return the results of the check function. So one should use 
> >>> either the
> >>> do-login or the with-flow yield construct... is this right? yield expects 
> >>> a
> >>> widget to render. do-login says yea or nay.
> >>>
> >>> So can someone explain continuations... I have, of course read Slava's 
> >>> neat
> >>> essay http://www.defmacro.org/ramblings/continuations-web.html
> >>>
> >>> What I'm looking for would be in chapter 5 of the user guide... I've 
> >>> pasted that
> >>> onto the Wiki I created.
> >>>
> >>> https://freedom.rayservers.com/Weblocks+Manual
> >>>
> >>> I'll update that as I get along.
> >>>
> >>> I am also planning to use Weblocks to create a "view" of other objects in
> >>> memory. Each browser that hits the Weblocks host, gets its own widget 
> >>> tree - its
> >>> own view, as it were.
> >>>
> >>> The store magic is very cool, but I won't be using it. Snapshots onto 
> >>> Tahoe is
> >>> going to be the approach and, eventually a cross between Tahoe and 
> >>> Scalaris.
> >>>
> >>> So the approach is going to be to write render methods and views for 
> >>> existing
> >>> objects...
> >>>
> >>> I'll stop rambling and try and ask a specific question. When to use 
> >>> with-flow
> >>> and when to use the do-login and friends and a couple of examples with 
> >>> both that
> >>> compile and work with make-navigation...
> >>>
> >>> Also, is there a working example of the weblocks-demo code with a trivial 
> >>> login?
> >>> I plan to hack that next.
> >>>
> >>> Cheers,
> >>>
> >>> ---Venkat.
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> > 
> > 
> > > 
> 
> 
> > 



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