[Fwd: Re: [Seaside] Iterations]

Markus Fritsche Fritsche.Markus@gmx.net
Mon, 17 Jun 2002 11:05:36 +0100


This is a multi-part message in MIME format.
--------------020908020205090409070508
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Attached: a question I accidently only sent to Avi.

Sorry, Markus

--------------020908020205090409070508
Content-Type: message/rfc822;
 name="Re: [Seaside] Iterations"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="Re: [Seaside] Iterations"

Message-ID: <3D0DB425.3070400@laptop>
Date: Mon, 17 Jun 2002 11:04:21 +0100
From: Markus Fritsche <mfritsche@laptop>
Reply-To:  Fritsche.Markus@gmx.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc3) Gecko/20020523
X-Accept-Language: en-us, en, de-de
MIME-Version: 1.0
To: Avi Bryant <avi@beta4.com>
Subject: Re: [Seaside] Iterations
References: <Pine.LNX.4.30.0206170146130.27208-100000@cable.beta4.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Avi Bryant wrote:

>  
>
>Ok, I think this is where you're going wrong.  WBCategory is a subclass of
>IAComponent, right?  You don't want to iterate over a list of components;
>instead, you want to iterate over data.  If 'categories' were a list of
>category names, you could do something like
>  
>
I think my example was too short :-) A php-script demonstrating what I 
want is at http://mfritsche.dyndns.org/phpbm/

I have the following design
   WebBookmarks holds a collection of WBCategorys
       WBCategory holds a collection with either WBItems (the real 
bookmark) or a WBCategory.

IAComponent subclass: #WebBookmarks
    instanceVariableNames: 'showURLs showComments orderBy categories '
    classVariableNames: ''
    poolDictionaries: ''
    category: 'Markus-Test'

IAComponent subclass: #WBCategory
    instanceVariableNames: 'dbid name comment dbparent state items '
    classVariableNames: ''
    poolDictionaries: ''
    category: 'Markus-Test'

IAComponent subclass: #WBItem
    instanceVariableNames: 'dbid categoryID date name description comment '
    classVariableNames: ''
    poolDictionaries: ''
    category: 'Markus-Test'

A WebBookmark is the startpoint for the application. It fetches it's 
configuration from a mysql-db, then all categorys (and builds the path). 
All items are fetched and then added to the corresponding categories. 
Then, a category should display itself (name, comment) and then all it's 
items (which, in turn, should also display itself). Each of them should 
have a button "change" (like in the example script, when you press 
"enter admin" at the bottom of the page), which should offer various 
options for changing an item (I haven't thought of interaction, until 
now, I will be happy to display it :-))

The Data is there (I began with #Object subclasses and made it function 
with the database before I changed the hierachy to IAComponent).

Since my programming style is wrecked by php (:-)) I don't know, if this 
is right (design+logic).

Thank you, Markus


--------------020908020205090409070508--