[Seaside] Bootstrap Examples Bug

jtuchel at objektfabrik.de jtuchel at objektfabrik.de
Wed Jan 28 20:04:39 UTC 2015

Hi Torsten,

I just had a look at your Twitter Boostrap Code in Pharo 3.0. Very nice!

I started porting it to VAST and it is almost perfectly running there, 
with the expception of a few missing methods in VAST like beginsWith: 
and such. These are easily handled with Grease Extensions.

Another problem is that Bootstrap needs JQuery 1.9.1 (e.g. for 
DropDowns) and the versions of Seaside shipped with VAST only come with 
1.7.x, which can also be handled easily by importing newer versions of 
JQuery into JQDevelopmentLibrary and JQDeploymentLibrary.

I also found a bug in the Bootstrap example application. A very easy one.

The list of examples includes TBSBootstrapTableExample, which is not an 
example, it is just an abstract superclass. Therefor it doesn't 
implement renderExampleOn:. This leads to an error in the examples app.

The solution is to not include TBSBootstrapTableExample in the list of 

TBSExampleBrowser>>#allExamples adds all subclasses of 
TBSBootstrapExample to the list:

^TBSBootstrapExample allSubclasses sort: [:a :b | a name <= b name ]

An easy fix would be to remove: TBSBootstrapTableExample from that list. 
A more generic fix would be to reject all classes that don't implement 
renderExanpleOn: . Still not a nice solution, but maybe the best from an 
effort <-> outcome perspective.

So I suggest changing TBSExampleBrowser>>#allExamples to:

     ^(TBSBootstrapExample allSubclasses select: [:ea| ea respondsTo: 
#renderExampleOn: ]) sort: [:a :b | a name <= b name ]

I can't commit code to STHub or SS3 (nor do I know how to do it), so I 
thought I'll just send this to the list.


Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

More information about the seaside mailing list