Issue with Demo Dev Version

4 views
Skip to first unread message

Mackram

unread,
Jun 25, 2009, 5:51:13 PM6/25/09
to weblocks
Hey Guys,

So after listening here for a while I figured I might as well look
directly at the upcoming version but I hit a little snag. Starting the
weblocks-demo starts and I can see the initial-page but when I click
on Start Demo my sbcl crashes with a message stating that the memory
is exhausted. I am running the latest version of sbcl (1.0.29.4)

Are there any packages that I need to update with this version of
weblocks.

Mackram

unread,
Jun 25, 2009, 5:58:47 PM6/25/09
to weblocks
Let me also note that it seems that the navigation does not work since
the following crashes on the navigation widget


(in-package :train)

;; Define callback function to initialize new sessions
(defun init-user-session (comp)
(setf (composite-widgets comp) (make-initial-page)))

(defun make-init-page ()
(make-instance 'composite :widgets
(list (make-instance 'flash :messages (list "Hello to my first
application" "hi there second element"))
(lambda ()
(with-html-to-string
(:div :style "text-align: center; margin-top: 25em;"
(:p :style "font-style: italic;"
"Roses are red," (:br)
"Violets are blue," (:br)
"Homage to you!" (:br))))))))



(defun make-initial-page ()
:documentation "just a test"
(make-navigation 'a-simple-menu
't1 (make-init-page)
'test1 (make-page "what you are doing")
'test2 (make-page "yow i am here")))

(defun make-page (text)
:documentation "a simple page showing a text"
(with-html-to-string
(:div :style "text-align: center; margin-top: 25em;"
(:p :style "font-style: italic;"
"Roses are red," (:br)
"Violets are blue," (:br)
(str text) (:br)
"Homage to you!" (:br)))))



(defmethod render-page-body :after ((app train) rendered-html)
(with-html
(:div :class "footer"
(:p :id "system-info"
"Running on "
(str (concatenate 'string (server-type) " " (server-version)))
" (" (str (concatenate 'string (lisp-implementation-type) " "
(lisp-implementation-version))) ")")
(:p :id "contact-info"
"Contact us with any questions or comments at the "
(:a :href "http://groups.google.com/group/weblocks" "Weblocks Google
Group") ".")
(:img :src "/pub/images/footer/valid-xhtml11.png" :alt "This site
has valid XHTML 1.1.")
(:img :src "/pub/images/footer/valid-css.png" :alt "This site has
valid CSS."))))

Leslie P. Polzer

unread,
Jun 26, 2009, 3:49:26 AM6/26/09
to weblocks
On Jun 25, 11:51 pm, Mackram <mack...@gmail.com> wrote:
> Hey Guys,
>
> So after listening here for a while I figured I might as well look
> directly at the upcoming version but I hit a little snag. Starting the
> weblocks-demo starts and I can see the initial-page but when I click
> on Start Demo my sbcl crashes with a message stating that the memory
> is exhausted. I am running the latest version of sbcl (1.0.29.4)

There's an infinite loop bug in the changes I committed this week.

I will fix them right away.

Leslie P. Polzer

unread,
Jun 26, 2009, 3:49:51 AM6/26/09
to weblocks
On Jun 25, 11:58 pm, Mackram <mack...@gmail.com> wrote:
> Let me also note that it seems that the navigation does not work since
> the following crashes on the navigation widget

Can you be more specific about "crashes" here?

Leslie P. Polzer

unread,
Jun 26, 2009, 3:56:56 AM6/26/09
to weblocks
> There's an infinite loop bug in the changes I committed this week.
>
> I will fix them right away.

Fixed in 0cfa494ecb98.

Mackram

unread,
Jun 29, 2009, 10:35:56 AM6/29/09
to weblocks
Hey,

Just wanted to point out that the Fix actually worked on both the
crashes and the menu issue. It should probably be noted that the menu
is no longer taking symbols but rather strings and lists cause I think
that was part of the issue.

On a side note, does the menu support multiple sub-menus or did anyone
attempt that? Also I have been checking the thread and i know that
there was some work for jquery is there a way to replace the current
javascript framework and if not anyone cares to point me in the
direction?

Regards,

Mackram

Leslie P. Polzer

unread,
Jun 29, 2009, 10:47:10 AM6/29/09
to webl...@googlegroups.com

Mackram wrote:

> On a side note, does the menu support multiple sub-menus or did anyone
> attempt that?

It's not hard to do this at a basic level by simply nesting
navigations.

To have a comfortable declarative interface one would have to
extend the INIT-NAVIGATION macro.


> Also I have been checking the thread and i know that
> there was some work for jquery is there a way to replace the current
> javascript framework and if not anyone cares to point me in the
> direction?

You need to edit the few scripts that come with Weblocks.

See docs/js-backend-abstraction.txt for some notes on this.

Here's a working AJAX interface for JQuery:


function initiateActionWithArgs(actionCode, sessionString, args, method) {
jj.ajax(
{
url:getActionUrl(actionCode, sessionString),
type: method,
success: onActionSuccess,
error: onActionFailure,
data: args
});
}


Mackram

unread,
Jun 29, 2009, 11:32:51 AM6/29/09
to weblocks
Hey Lesile

Thanks for the quick reply. So i checked the doc and as i checked the
different files I realized there was an issue in dialog.js

Position.GetViewportSize = function() {
var w = window;
var width = w.innerWidth ||
(w.document.documentElement.clientWidth ||
w.document.body.clientWidth);
var height = w.innerHeight ||
(w.document.documentElement.clientHeight ||
w.document.body.clientHeight);
return [width, height]
}
Position.EyeLevel = function(element, parent) {
var w, h, pw, ph;
var d = Element.getDimensions(element);
w = d.width;
h = d.height;
Position.prepare();
if (!parent) {
var ws = Position.GetViewportSize();
pw = ws[0];
ph = ws[1];
} else {
pw = parent.offsetWidth;
ph = parent.offsetHeight;
}
var eyeLevel = ph - (ph/4*3) - (h/2);
var screenCenter = (ph/2) - (h/2);
var scrollX = 0, scrollY = 0;
if(!window.XMLHttpRequest) {
// IE 6 only, as we can't use position: fixed
scrollX = Position.deltaX;
scrollY = Position.deltaY;
}
element.style.top = (eyeLevel < (ph / 10) ? screenCenter :
eyeLevel) + scrollY + "px";
element.style.left = (pw/2) - (w/2) + scrollX + "px";
}

As you can see it is missing a ; on line 6, 7 and 32 (which results in
a not so nice dialog).

Should I upload to the repository (not sure yet if I have permission).

Regards,


On Jun 29, 5:47 pm, "Leslie P. Polzer" <s...@viridian-project.de>
wrote:

Leslie P. Polzer

unread,
Jun 29, 2009, 12:25:52 PM6/29/09
to webl...@googlegroups.com

Mackram wrote:

> As you can see it is missing a ; on line 6, 7 and 32 (which results in
> a not so nice dialog).

It's a bit hard to see since you haven't annotated the lines...

I have spotted one at the beginning but the line is followed
by a closing curly which implies a semicolon (IIRC).


> Should I upload to the repository (not sure yet if I have permission).

Here are some notes for contributing:

http://trac.common-lisp.net/cl-weblocks/wiki/WeblocksDevelopment

You basically need to send a patch or fork your own repository
and send a pull request.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages