On Mon, Jul 29, 2019 at 12:00:07PM -0400, pharo-users-requ...@lists.pharo.org 
wrote:
> Send Pharo-users mailing list submissions to
>       pharo-users@lists.pharo.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       http://lists.pharo.org/mailman/listinfo/pharo-users_lists.pharo.org
> or, via email, send a message with subject or body 'help' to
>       pharo-users-requ...@lists.pharo.org
> 
> You can reach the person managing the list at
>       pharo-users-ow...@lists.pharo.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Pharo-users digest..."
> 
> 
> Today's Topics:
> 
>    1. Warning Newbie Question: Bootstrap Navbar example works my
>       copy and paste fails? (ian)
>    2. Re: Warning Newbie Question: Bootstrap Navbar example works
>       my copy and paste fails? (jtuc...@objektfabrik.de)
>    3. Re: Warning Newbie Question: Bootstrap Navbar example works
>       my copy and paste fails? (Esteban Maringolo)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sun, 28 Jul 2019 21:02:01 -0400
> From: ian <i...@icjohnson.com>
> To: pharo-users@lists.pharo.org
> Subject: [Pharo-users] Warning Newbie Question: Bootstrap Navbar
>       example works my copy and paste fails?
> Message-ID: <20190729010201.ga11...@desktop.icjohnson.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi All,
> 
> Hopefully this is an easy one?
> 
> I have been going through the MOOC exercises and have come across something I 
> can't seem to figure out.
> 
> In the example the code reads:
> 
> ----
> renderExampleOn: html
> 
> | bar id|
>       id := 'navbarSupportedContent'.
>       bar := html navigationBar.
>       bar beLight; expandLarge.
>       bar background beLight.
>       bar with: [ 
>               html navigationBarBrand: 'Navbar'. ]
> 
> ----
> 
> Mine reads exactly the same but errors in the browser with:
> 
> ----
> 
> Seaside Walkback
> MessageNotUnderstood: WAHtmlCanvas>>navigationBar
> 
> Debug Proceed Full Stack
> Possible Causes
> 
>     you sent a message this type of object doesn't understand
> 
> Stack Trace
> 
>     thisContext
>         WAHtmlCanvas(Object)>>doesNotUnderstand: #navigationBar
>     self
>         a WAHtmlCanvas
> 
>     thisContext
>         VIHeaderComponent>>renderContentOn:
>     self
>         a VIHeaderComponent
> 
>     thisContext
>         WARenderVisitor>>visitPainter:
>     self
>         a WARenderVisitor
> 
>     thisContext
>         WARenderVisitor(WAPainterVisitor)>>visitPresenter:
>     self
>         a WARenderVisitor
> 
>     thisContext
>         WARenderVisitor(WAPainterVisitor)>>visitComponent:
>     self
>         a WARenderVisitor
> 
> ----
> 
> When using Finder to locate the selector, navigationBar, I notice that it is 
> a selector of SBSHtmlCanvas.
> 
> So my question is: How to I set up my rendering class in seaside properly?  
> Currently, as per all I can find I am properly using WAComponent as 
> application super class.
> 
> I don't see anything in the seaside book regarding bootstrap and I am 
> fallowing the MOOC section on bootstrap almost to a tee.  Accepting the fact 
> that the library is now SBSDeploymentLibrary rather than TBSDeploymentLibrary.
> 
> Any help would be greatly appreciated.
> 
> Kindly,
> 
> Ian
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 29 Jul 2019 09:40:31 -0300
> From: Esteban Maringolo <emaring...@gmail.com>
> To: Any question about pharo is welcome <pharo-users@lists.pharo.org>
> Subject: Re: [Pharo-users] Warning Newbie Question: Bootstrap Navbar
>       example works my copy and paste fails?
> Message-ID:
>       <CAJMgPC+TGk+q-8QU9S7im06ARgkKT-3eC51hCNMRuB=8vfg...@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> You're using the Bootstrap 4 library and methods.
> 
> I don't know about the one referenced in the MOOC, but there are
> several differences between Torsten's Bootstrap 3 (TBS prefixed
> classes) and Bootstrap 4 (SBS prefix), in particular because Bootstrap
> 4 library wrapper uses a subclass of WAHtmlCanvas where all the
> methods are implemented.
> 
> See if your component implements #rendererClass it should return
> SBSHtmlCanvas as its renderer class instead of the default, inherited,
> WAHtmlCanvas.
> 
> Regards,
> 
> 
> Esteban A. Maringolo
> 
Thanks Esteban,

In the playground:

----
        | header |

                header := VIHeaderComponent new.
                header rendererClass.

----

        Returns: WAHtmlCanvas and not SBSHtmlCanvas.

----

Thus the fix was to override rendererClass and return the correct rendering 
class.

Nowhere in the documentation is this evident (although if I was ST proficient I 
would have been able to figure that out?

Thanks Muchly Esteban!!

Reply via email to