Re: [Pharo-users] why is my css not found in a seaside project
Yes, you typically put that code in a class side method, like #register. Then you can call #register from your class' #initialize if you want. The advantage is that your registration process is now written out programmatically, instead of being a UI procedure, so it is more repeatable, shareable, etc.
On 4 Jan 2020, at 19:42, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:
From: Roelof Wobben <r.wobben@home.nl> Subject: Re: [Pharo-users] why is my css not found in a seaside project Date: 4 January 2020 at 19:42:44 GMT+1 To: Any question about pharo is welcome <pharo-users@lists.pharo.org>
So, if I understand the seaside book well , I have to add this to the painting class :
initialize | app | app := WAAdmin register: YourWAComponent asApplicationAt: 'my-app'. app addLibrary: YourLibrary;
or must I use another class and if so, which class.
Roelof
Op 4-1-2020 om 13:32 schreef Roelof Wobben:
Yes, I added it by using localhost:8080/config and then choose for the application.
In the tutorial Im following that was the way the application is registered and the library.
So where should I add the code you are saying to use.
Here is the code I have so far: https://github.com/RoelofWobben/paintings
Roelof
Op 4-1-2020 om 12:58 schreef Sven Van Caekenberghe:
Did you add your library to your application ?
| app | app := WAAdmin register: YourWAComponent asApplicationAt: 'my-app'. app addLibrary: YourLibrary;
On 4 Jan 2020, at 11:58, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:
From: Roelof Wobben <r.wobben@home.nl> Subject: Re: [Pharo-users] why is my css not found in a seaside project Date: 4 January 2020 at 11:58:46 GMT+1 To: Any question about pharo is welcome <pharo-users@lists.pharo.org>
Yes. it is callled
Roelof
Op 4-1-2020 om 11:48 schreef Sven Van Caekenberghe:
Try putting a breakpoint inside the #updateRoot: of your library class. Is it even called ?
On 4 Jan 2020, at 11:17, Roelof Wobben via Pharo-users <pharo-users@lists.pharo.org> wrote:
From: Roelof Wobben <r.wobben@home.nl> Subject: why is my css not found in a seaside project Date: 4 January 2020 at 11:17:13 GMT+1 To: Any question about pharo is welcome <pharo-users@lists.pharo.org>
Hello,
I have this in my library class on the instance side : updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot stylesheet url: self class / #mainCss. anHtmlRoot javascript url: self class / #mainJs
and a file mainCss on the instance side filled with css and still the css is not found
anyone idea why ?
if needed I can put my whole code on github.
Regards,
Roelof
Op 4-1-2020 om 22:48 schreef Sven Van Caekenberghe:
| app | app := WAAdmin register: YourWAComponent asApplicationAt: 'my-app'. app addLibrary: YourLibrary;
Oke, so like I did in my last commit here : https://github.com/RoelofWobben/paintings but still I do not understand why the css is not used. Roelof
You might want to read the following article: https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b532... sections 7 & 8 are about the Seaside app, but it is simple enough to read completely. It is a bit old, but as far as I know, it should still work, especially the part that you have trouble with (the CSS/WAComponent interaction). Maybe this helps a bit. BTW, you can also add a #style method to any component returning a string with CSS.
On 4 Jan 2020, at 23:16, Roelof Wobben <r.wobben@home.nl> wrote:
Op 4-1-2020 om 22:48 schreef Sven Van Caekenberghe:
| app | app := WAAdmin register: YourWAComponent asApplicationAt: 'my-app'. app addLibrary: YourLibrary;
Oke, so like I did in my last commit here : https://github.com/RoelofWobben/paintings
but still I do not understand why the css is not used.
Roelof
participants (2)
-
Roelof Wobben -
Sven Van Caekenberghe