renderContentOn: Generating Confusing Error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

renderContentOn: Generating Confusing Error

Conrad Taylor
Hi, I have the following #renderContentOn: method from an online tutorial:

renderContentOn: html
        html heading: 'Contacts' level: 1.
        self addressBook contacts do:
                        [ :contact |
                                (html div) class: ('row');
                                with: [ (html anchor)
                                                        callback: [ self showContact: contact ]; with: (contact
firstName , ' ', contact surname ) ]].

        html form:
                        [(html span)
                                class: 'button';
                                with: [html submitButton on: #addContact of: self]]

I'm getting the following exception stack when it is executed:

Stack Trace

thisContext
True(Object)>>doesNotUnderstand:
self
true
aMessage
a Message with selector: #firstName and arguments: #()
excpt
a MessageNotUnderstood
resumeValue
nil

thisContext
optimized [] in [] in MyAddressBookView>>renderContentOn:
self
BlockClosure [] in [] in MyAddressBookView>>renderContentOn:
html
a Seaside.WARenderCanvas
self
a MyAddressBookView
contact
true

thisContext
BlockClosure>>renderOn:
self
BlockClosure [] in [] in MyAddressBookView>>renderContentOn:
aRenderer
a Seaside.WARenderCanvas

thisContext
optimized [] in Seaside.WATagBrush>>with:
self
BlockClosure [] in Seaside.WATagBrush>>with:
self
a Seaside.WADivTag
anObject
BlockClosure [] in [] in MyAddressBookView>>renderContentOn:

thisContext
BlockClosure>>renderOn:
self
BlockClosure [] in Seaside.WATagBrush>>with:
aRenderer
a Seaside.WARenderCanvas

>From the stack trace, it doesn't understand the following:

contact firstName

If anyone has any ideas as to what may be the issue here, please feel
free to post.  I'm using Seaside 2.8 Beta, VW 7.5, and Mac OS 10.4.10.

Thanks in advance,

-Conrad
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: renderContentOn: Generating Confusing Error

Lukas Renggli
It looks like the collection you get from

   self addressBook contacts

does not return what you expect.

Lukas

On 9/7/07, Conrad Taylor <[hidden email]> wrote:

> Hi, I have the following #renderContentOn: method from an online tutorial:
>
> renderContentOn: html
>         html heading: 'Contacts' level: 1.
>         self addressBook contacts do:
>                         [ :contact |
>                                 (html div) class: ('row');
>                                 with: [ (html anchor)
>                                                         callback: [ self showContact: contact ]; with: (contact
> firstName , ' ', contact surname ) ]].
>
>         html form:
>                         [(html span)
>                                 class: 'button';
>                                 with: [html submitButton on: #addContact of: self]]
>
> I'm getting the following exception stack when it is executed:
>
> Stack Trace
>
> thisContext
> True(Object)>>doesNotUnderstand:
> self
> true
> aMessage
> a Message with selector: #firstName and arguments: #()
> excpt
> a MessageNotUnderstood
> resumeValue
> nil
>
> thisContext
> optimized [] in [] in MyAddressBookView>>renderContentOn:
> self
> BlockClosure [] in [] in MyAddressBookView>>renderContentOn:
> html
> a Seaside.WARenderCanvas
> self
> a MyAddressBookView
> contact
> true
>
> thisContext
> BlockClosure>>renderOn:
> self
> BlockClosure [] in [] in MyAddressBookView>>renderContentOn:
> aRenderer
> a Seaside.WARenderCanvas
>
> thisContext
> optimized [] in Seaside.WATagBrush>>with:
> self
> BlockClosure [] in Seaside.WATagBrush>>with:
> self
> a Seaside.WADivTag
> anObject
> BlockClosure [] in [] in MyAddressBookView>>renderContentOn:
>
> thisContext
> BlockClosure>>renderOn:
> self
> BlockClosure [] in Seaside.WATagBrush>>with:
> aRenderer
> a Seaside.WARenderCanvas
>
> >From the stack trace, it doesn't understand the following:
>
> contact firstName
>
> If anyone has any ideas as to what may be the issue here, please feel
> free to post.  I'm using Seaside 2.8 Beta, VW 7.5, and Mac OS 10.4.10.
>
> Thanks in advance,
>
> -Conrad
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside