Oke

if I understand that article�� I have to put this :

initialize
  (WAAdmin register: self asApplicationAt: 'reddit')
    preferenceAt: #sessionClass put: RedditSession;
    addLibrary: RedditFileLibrary 

in the class side of the library and not at the class side of the class that descrives the thing I want
to display.

Roelof




Op 4-1-2020 om 23:44 schreef Sven Van Caekenberghe:
You might want to read the following article:

  https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740

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