[Seaside] Help understanding WATableReport

Kamil Kukura kamk at volny.cz
Thu Aug 26 11:44:43 CEST 2004


>> Date today yyyymmdd
>>
>> (you should really learn how to find such answers yourself. Is it that
>> hard to open browser on class Date and look what methods are there?)
>
> No, it's not. And that is precisely what I spent several hours doing. 
> The only method that I could get to work through seaside was 
> #asString. So, I thought that there must be some magic that only the 
> experts know about. Clicking on the Sort link above my date or time 
> columns returns a ' Dates are not indexable' error. I inferred from 
> this, that dates could not be sorted. Converting them to strings 
> removed the error, which re-inforced my belief.

 From your question it was not clear as for what purpose you want to 
convert date to string. If you get an error, try to examine walkback and 
post it here or to squeak-dev mailing list if it is more general thing.

> I can see that #sortBlock: assigns an object. But, what does that 
> object have to look like to make a WAReportColumn sortable? Something 
> that is intuitively obvious for an expert, is frustratingly obtuse to 
> a novice. But, you must be getting tired of dealing with novices, so 
> I'm not expecting a reply. Thank you. You have been a great help so far.
> -Larry

Feel free to ask question as why 2 plus 2 is 4. I witnessed that even 
masterful developers have hard times to answer simple questions. But in 
your case there must be something that needs to be brought to the light. 
Date is derived from Magnitude and is then sortable: "Date tomorrow > 
Date today". You can try with SortedCollection:

sc _ SortedCollection new.
sc addAll: {Date tomorrow. Date today}.

-- 
Kamil



More information about the Seaside mailing list