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.wob...@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.wob...@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.wob...@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 >>>>>> >>>>>> >>>>>> >>>> >>>> >>>> >>> >> > > > >