Little progress

49 views
Skip to first unread message

Jacek Podkanski

unread,
Oct 7, 2012, 6:34:45 PM10/7/12
to webl...@googlegroups.com
Hi,

I was experimenting a bit in my spare time and now I a question.

I didn't work out how to use weblocks:reset-sessions. No matter what I
have tried in REPL it didn't work.

I came up with following solution. In the console I do:
$ sbcl --load ./restart_webtrial.lisp

restart_webtrial.lisp script contains following:
(ql:quickload 'webtrial)
; (weblocks:start-weblocks)
(webtrial:start-webtrial)

To refresh the page content I have to kill sbcl with Ctrl + D and then
run the restart script.

Is there a better way of doing it? If I'm supposed to use reset-sessions
can I have more detailed instructions?


Jacek Podkanski

unread,
Oct 7, 2012, 6:51:24 PM10/7/12
to webl...@googlegroups.com, ruby....@googlemail.com
Please ignore it. I have found it.

Jacek Podkanski

unread,
Oct 7, 2012, 7:09:48 PM10/7/12
to webl...@googlegroups.com, ruby....@googlemail.com
it's embarrassing, but I have no idea what I did right. Command weblocks:reset-sessions doesn't work now.

Leslie P. Polzer

unread,
Oct 8, 2012, 4:14:33 AM10/8/12
to webl...@googlegroups.com, ruby....@googlemail.com
What exactly are you trying to achieve?

Jacek Podkanski

unread,
Oct 8, 2012, 8:28:51 AM10/8/12
to webl...@googlegroups.com
When I create new application I get a blank page with Happy hacking written on it. If I edit the source to show Hello World I need to restart the server to see the changes on the web page.
--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To view this discussion on the web visit https://groups.google.com/d/msg/weblocks/-/5LjSEN2HXoQJ.
To post to this group, send email to webl...@googlegroups.com.
To unsubscribe from this group, send email to weblocks+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/weblocks?hl=en.

Leslie P. Polzer

unread,
Oct 9, 2012, 4:21:12 AM10/9/12
to webl...@googlegroups.com, ruby....@googlemail.com


On Monday, October 8, 2012 2:28:59 PM UTC+2, Jacek Podkanski wrote:
When I create new application I get a blank page with Happy hacking written on it. If I edit the source to show Hello World I need to restart the server to see the changes on the web page.

Ah, I see. RESET-SESSIONS should work properly. If it doesn't then you can just delete the session cookie on the client side. An alternative would be defining your own widget that renders the string on a per-request basis. Ex.:

(defwidget show-my-string nil nil)

(defmethod render-widget-body ((widget show-my-string) &rest args)
  (with-html
     "Hello world")) ; changing this to another string and updating your Lisp image should be reflected instantly on a page reload. 

Thanks for your interest in Weblocks!

  Leslie
Reply all
Reply to author
Forward
0 new messages