Grid of components

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

Grid of components

keith1y
If I have a grid component which is formed of subcomponents this could
be a lot of components
it seems that it is necessary to return #children for subcomponents

Does this mean building up and keeping an array of perhaps several
hundred components in children or is there another/better way?

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

RE: Grid of components

Sebastian Sastre-2
I'm using a presenter superclass that answers #children for all it's
subclasses. The subclasses has to have some method (#initialize for
instance) in which you add children to the component in a way it can answer
them. I'm making like this ala Dolphin:

        SomePresenter>>createComponents
                super createComponents.
       
                self
                        at: #date put: MVPDatePresenter new;
                        at: #subject put: MVPInputTextPresenter new;
                        at: #budget put: MVPBudgetPresenter new;
                        yourself

        the superclass MVPPresenter is the only one that implements
#children and it's trivial:

                MVPPresenter>>children
               
                        ^ self components values

        #components is a dictionary in an instVar at that MVPPresenter

        may this give you ideas,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Keith Hodges
> Enviado el: MiƩrcoles, 03 de Octubre de 2007 05:42
> Para: sea >> "The Squeak Enterprise Aubergines Server -
> general discussion."
> Asunto: [Seaside] Grid of components
>
> If I have a grid component which is formed of subcomponents
> this could be a lot of components it seems that it is
> necessary to return #children for subcomponents
>
> Does this mean building up and keeping an array of perhaps
> several hundred components in children or is there another/better way?
>
> Keith
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Grid of components

Philippe Marschall
In reply to this post by keith1y
2007/10/3, Keith Hodges <[hidden email]>:
> If I have a grid component which is formed of subcomponents this could
> be a lot of components
> it seems that it is necessary to return #children for subcomponents

That's true. A grid of components is no different than any other
component containing components.

> Does this mean building up and keeping an array of perhaps several
> hundred components in children or is there another/better way?

No but it doesn't have to be an array and you need to return only the
current components. Note however that you'll probably need to
backtrack the collection as well.

Cheers
Philippe

> Keith
> _______________________________________________
> 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