#updateUrl:

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

#updateUrl:

John Thornborrow
Hello all,

Could anyone please see if they can see any errors/problems that would
prevent the component(s) shown below as content from having #updateUrl:
invoked?

---
renderContentOn: html
    | content |
    content _ (Smalltalk at: (registry at: 'content')) new registry:
registry.
    html div id: 'page'; with: [
        html div id: 'header'; with: [
            html render: header].
       
        html render: menu.
       
        html div id: 'content'; with: [
            html render: content].
       
        html div id: 'footer'; with: [
            html render: footer]]
---

I have abstracted the #updateUrl: method and all my components are a
subclass of it, where they simply override a #url method to return the
string value to be added to the path:

---
AbstractComponent>>#updateUrl: aUrl
    aUrl addToPath: self url

AbstractComponent>>#url
   ^''
---

Here is an example of what a component returns:

---
Component>>#url
  ^'about'
---


I have placed a "self halt" in the AbstractComponent>>#updateUrl:
method, and the only objects which have this invoked are the root
object, and the menu - yet the header, footer, and content objects are
all subclasses of the same abstractcomponent.. am I losing my marbles?

Many thanks,
John.

www.pinesoft.co.uk


Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

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

Re: #updateUrl:

John Thornborrow
Ignore me...

I'd neglected to add the components in what is returned by #children.

Regards,
John.

John Thornborrow wrote:

> Hello all,
>
> Could anyone please see if they can see any errors/problems that would
> prevent the component(s) shown below as content from having #updateUrl:
> invoked?
>
> ---
> renderContentOn: html
>     | content |
>     content _ (Smalltalk at: (registry at: 'content')) new registry:
> registry.
>     html div id: 'page'; with: [
>         html div id: 'header'; with: [
>             html render: header].
>        
>         html render: menu.
>        
>         html div id: 'content'; with: [
>             html render: content].
>        
>         html div id: 'footer'; with: [
>             html render: footer]]
> ---
>
> I have abstracted the #updateUrl: method and all my components are a
> subclass of it, where they simply override a #url method to return the
> string value to be added to the path:
>
> ---
> AbstractComponent>>#updateUrl: aUrl
>     aUrl addToPath: self url
>
> AbstractComponent>>#url
>    ^''
> ---
>
> Here is an example of what a component returns:
>
> ---
> Component>>#url
>   ^'about'
> ---
>
>
> I have placed a "self halt" in the AbstractComponent>>#updateUrl:
> method, and the only objects which have this invoked are the root
> object, and the menu - yet the header, footer, and content objects are
> all subclasses of the same abstractcomponent.. am I losing my marbles?
>
> Many thanks,
> John.
>
> www.pinesoft.co.uk
>
>
> Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
>
>
>
> This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>  
>
>  

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside