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 |
Ian,
the first thing to do (imo) is to look for implementers of #navigationBar. I would guess there is none to be found in your image. That would mean you most probably don't have the code required for Seaside/Bootstrap loaded into your image. I am not a Pharo user, so I cannot tell you exactly how to load Seaside-Bootstrap in Pharo, but I am sure this is relatively easy to solve by the help of either Ecosia/DuckDuckGo/Yahoo or some Pharoer on this list. The steps to follow: 1. See if the method is implemented somewhere in your image 2. Try to find out whether your are sending a. the wrong message to the right object b. the right message to the wrong object c. a message that should be understood by the reciever but isn't I guess a) and b) can be excluded in your case, your code looks good to me. So the problem seems to be c). I am pretty sure the Seaside-Bootstrap package is missing in your image, it adds extension methods to WAHtmlCanvas, and I guess #navigationBar is one of them... HTH, Joachim Am 29.07.19 um 03:02 schrieb ian: > 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 > > -- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:[hidden email] 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 |
In reply to this post by ian
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 On Sun, Jul 28, 2019 at 10:02 PM ian <[hidden email]> wrote: > > 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 > |
Solution:
>>renderClass ^ SMSHtmlCanvas Thanks Esteban! -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html |
Have I missed something? Is there a pharo Bootstrap 4? How do I get that?
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html |
Hi Jeff,
Here <https://github.com/astares/Seaside-Bootstrap4> Regards, Esteban A. Maringolo On Thu, Aug 1, 2019 at 3:48 AM Jeff Gray <[hidden email]> wrote: > > Have I missed something? Is there a pharo Bootstrap 4? How do I get that? > > > > > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html > |
Free forum by Nabble | Edit this page |