« Return to Thread: error using Date in WebGrid

Re: error using Date in WebGrid

by Janko Mivsek :: Rate this Message:

Reply to Author | View in Thread

Hi Leon,

Sorry for so late answer, but you are probably following events to know
why :)

About Date (and also Number) auto conversions, those are still Slovenian
locale specific and need to be extended. This is also very hard to do in
portable way, because every Smalltalk has its own locale support. But
for now you can simply extend those two autoConvert methods and do your
own conversion. And then you can maybe contribute some more general
solution, I you can find some time. We will appreciate that!

Best regards
JAnko


Leon Smith wrote:

> Completing the tutorial I have converted my viewMain to use a WebGrid. When I
> add a Date field to it, it blows up trying to autoconvert the Date
> (WebFormElement>>autoConvertToString:) and calling a method called
> #shorterPrintSloString which is only implemented in a Class called SpDate in
> the Sport-Times package.
>
> I can fix this by changing the aspect to a method that returns a String
> instead of Date, but I thought you might want to know about this potential
> bug.
>
> My viewMain before I change the aspect:
>
> viewMain
> | e entryList |
> e := WebElement new.
> e addTextH1: 'Uwali Contest Site'.
> entryList := WebGrid new.
> entryList columnNames: #('' 'Title' 'Category' 'Start ' 'Description' );
> setNumbering;
> columnFilters: #(nil true true true nil );
> sortOn: 2;
> collection: self observee contests;
> columnAspects: #(nil #title #categoryTitle #startDate #shortDescription
> );
>
> column: 2
> addBlock: [:each | WebElement new addLinkTo: each text: each title].
> e add: entryList.
> e addBreak.
> e
> addLinkTo: self
> text: 'Add a new Contest'
> view: #add.
> self pageFrameWith: e title: 'Contest Site'
>
>
> Thanks
> Leon

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida

 « Return to Thread: error using Date in WebGrid