Dear all,
I'm trying out Willow which looks very interesting, however I'm struggling with simple examples ... I basically follow the blogs (here). I loaded Willow with Bootstrap and prepared the To-Do app as described in blog series. This works OK, however when I try to do something more, like button := AsynchronicButtonWebView labeled: 'Now it''s time to click'. button onTrigger executeOnClient: [ :canvas | canvas javascript alert: 'You just clicked a button' ] the browser's javascript gives no response, and its console reports some errors: It looks like problems with libraries. I checked the examples in WillowPlayground (which works OK, BTW), and found out that some basic things are way richer than described in the blogs. For instance, component supplier is not just componentSupplierForApplication ^ Bootstrap4ComponentSupplier online as in the blog, but: componentSupplierForApplication ^ BootstrapComponentSupplier withBootstrapLibrary: (self deploymentMode libraryFor: Bootstrap3MetadataLibrary) withoutOptionalTheme selectLibrary: ((self deploymentMode libraryFor: BootstrapSelectLibrary) using: self language) datepickerLibrary: ((self deploymentMode libraryFor: BootstrapDatepickerLibrary) using: self language) typeaheadLibrary: (self deploymentMode libraryFor: BootstrapTypeaheadLibrary) new My question is - is there a better documentation available for Willow? It's quite hard to study all bits and pieces from scratch. The second question is about the suggested "architecture" or design pattern that should be followed when using Willow. The blog mixes Seaside components (e.g. #PendingTask as a subclass of WAPainter) that engages Seaside rendering elements (e.g. html paragraph:) on one hand, with the components supplier's components (e.g. singleLineTextField ...) implemented directly in the Willow Application on the other hand. This probably isn't the way things should be done :-) Best wishes, Tomaz |
Hi Tomas, Comments inline. On Sun, Jan 19, 2020 at 2:59 PM Tomaž Turk <[hidden email]> wrote:
I will check because this looks like a problem in the online version of the jquery library. You've got this error following just the tutorial steps?
There are two operations modes for the component supplier.
The doc available is the one in the repo under /docs, the blog posts and the sample applications in Willow-Playground. If you have some ideas on missing docs or parts of the documentation that can be improved please fill an issue in https://github.com/ba-st/Willow/issues
Mixing standard Seaside rendering with Willow components it's Ok. The rule to follow here is:
Since some versions Willow extended standard Seaside facilities so you can use the command-like interface with standard Seaside brushes. Take a look at WATagBrush Willow extensions. So you can do something like: html div with: [ html text: 'Hi!'] applying: [:container | container addClass bootstrap backgroundInfo] Where the block in applying: allows the same command-like interface available for components.
Regards, Gabriel |
Dear Gabriel, Yes, I followed the steps from the blog - my code is here: https://github.com/eftomi/willow-tryout/blob/master/Poskusi-Willow/ToDoApplication.class.st. Maybe I misunderstood something. Many thanks for additional explanations about Willow coding. Best wishes, Tomaz
------ Original Message ------
From: "Gabriel Cotelli" <[hidden email]>
To: "Tomaž Turk" <[hidden email]>; "Any question about pharo is welcome" <[hidden email]>
Sent: 20.1.2020 12:49:37
Subject: Re: [Pharo-users] Willow documentation
|
Hi there. I just tried reproducing all the steps in the tutorials, then adding the onTrigger for the button, exactly as you wrote in your mail, and it works for me. I don't get any errors in the console. I implemented it in a clean installation of Pharo with the latest release of Willow-Playground, on Windows 10, rendering with Opera. Could you check if those same steps give you the result you mention? Thanks for your interest in Willow!
On Monday, January 20, 2020, 02:02:31 PM GMT-3, Tomaž Turk <[hidden email]> wrote:
Dear Gabriel, Yes, I followed the steps from the blog - my code is here: https://github.com/eftomi/willow-tryout/blob/master/Poskusi-Willow/ToDoApplication.class.st. Maybe I misunderstood something. Many thanks for additional explanations about Willow coding. Best wishes, Tomaz
------ Original Message ------
From: "Gabriel Cotelli" <[hidden email]>
To: "Tomaž Turk" <[hidden email]>; "Any question about pharo is welcome" <[hidden email]>
Sent: 20.1.2020 12:49:37
Subject: Re: [Pharo-users] Willow documentation
|
In reply to this post by eftomi
Dear Maximiliano, thanks for checking, I'll try once again, step by step. Best wishes, Tomaz
------ Original Message ------
From: "Maximiliano Tabacman" <[hidden email]>
To: "Any question about pharo is welcome" <[hidden email]>; "Tomaž Turk" <[hidden email]>
Sent: 24.1.2020 13:53:42
Subject: Re: [Pharo-users] Willow documentation
|
Free forum by Nabble | Edit this page |