Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Rendering Recursive widgets
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jrwats  
View profile  
 More options Nov 6, 11:26 am
From: jrwats <jrw...@gmail.com>
Date: Fri, 6 Nov 2009 08:26:52 -0800 (PST)
Local: Fri, Nov 6 2009 11:26 am
Subject: Rendering Recursive widgets
Writing my first weblocks app and I've hitting a wall at the moment.
I'm attempting to render a recursive widget that represents a
directory.  Goal is to have typical tree view - probably the exact
same thing as this user wanted:
http://groups.google.com/group/weblocks/browse_thread/thread/dcdb8482...

Anyhow, I have the top widget working.  It defaults to rendering
"collapsed" and when you click its name it attempts to render it
children, but it does so by using a different view:

Here's the pastebin all pretty and colored: http://paste.lisp.org/display/89899#1
.

I left out a lot of code, only pasting what I considered to be
relevant, hopefully this wasn't a misguided decision.  In any case I
believe the problem to be calling:
(mapcar #'render-widget (children widget)
from within
render-view-field-value

as the error I get is:

There is no applicable method for the generic function #<STANDARD-
GENERIC-FUNCTION WEBLOCKS:DOM-CLASSES (4)>  when called with arguments
(#<AW::DIR-TREE-WIDGET {100501D971}>).

I believe I read that this is the error one gets when using a widget
in a view context?  So my question, then, is if I can't do the
recursion in the view, I'm not quite sure how to accomplish it in the
widget... so what do I do?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jrwats  
View profile  
 More options Nov 6, 11:33 am
From: jrwats <jrw...@gmail.com>
Date: Fri, 6 Nov 2009 08:33:43 -0800 (PST)
Local: Fri, Nov 6 2009 11:33 am
Subject: Re: Rendering Recursive widgets
Feel free to tell me to stop re-inventing the wheel and just do the
following:
http://groups.google.com/group/weblocks/browse_thread/thread/3b626c8f...
But I'm still curious...

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jrwats  
View profile  
 More options Nov 6, 2:26 pm
From: jrwats <jrw...@gmail.com>
Date: Fri, 6 Nov 2009 11:26:06 -0800 (PST)
Local: Fri, Nov 6 2009 2:26 pm
Subject: Re: Rendering Recursive widgets
OK now this is weird:

Changed

(mapcar #'render-widget (children widget))

to

(make-instance
       'composite
       :widgets (mapcar #'render-widget-body (children widget)))

Note that it was the change from render-widget to render-widget-body
that made the difference.  Anyone know why?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leslie P. Polzer  
View profile  
 More options Nov 6, 3:02 pm
From: "Leslie P. Polzer" <leslie.pol...@gmx.net>
Date: Fri, 6 Nov 2009 12:02:03 -0800 (PST)
Local: Fri, Nov 6 2009 3:02 pm
Subject: Re: Rendering Recursive widgets
On Nov 6, 8:26 pm, jrwats <jrw...@gmail.com> wrote:

> Note that it was the change from render-widget to render-widget-body
> that made the difference.  Anyone know why?

Does your dir-tree-widget inherit from widget?

  Leslie


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jrwats  
View profile  
 More options Nov 6, 3:51 pm
From: jrwats <jrw...@gmail.com>
Date: Fri, 6 Nov 2009 12:51:39 -0800 (PST)
Local: Fri, Nov 6 2009 3:51 pm
Subject: Re: Rendering Recursive widgets
On Nov 6, 12:02 pm, "Leslie P. Polzer" <leslie.pol...@gmx.net> wrote:

> On Nov 6, 8:26 pm, jrwats <jrw...@gmail.com> wrote:

> > Note that it was the change from render-widget to render-widget-body
> > that made the difference.  Anyone know why?

> Does your dir-tree-widget inherit from widget?

How embarrassing.  You're right.  I used defclass rather than
defwidget.  Problem solved.  Now on to making real views for these bad
boys.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google