Re: Standalone package for WABuilder / WAHtmlCanvas ?

"H. Hirzel" <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CAGQxfVhibOxF2fAhBGaAKDsTR7cHhxbPusM_u1ba37z4J5RP2Q@mail.gmail.com>
UPDATE:

With what I described in the previous mail the following expressions

  WAHtmlCanvas builder render: [ :html |
                html unorderedList: [
                        html listItem: 'an item' ]]

gives as result


   [ :html | html unorderedList: [ html listItem: 'an item' ] ]


I would expect a HTML string.

On 9/19/17, H. Hirzel <[email protected]> wrote:
> Thank you for the answer, Philippe.
>
> (For some reason I can post messages to the mailing list but do not
> receive answers.
> I had to check
> http://lists.squeakfoundation.org/pipermail/seaside/2017-September/032832.html
> to find it).
>
>
> This is what tried to get a Standalone HTML builder Seaside type:
> ----------------------------------------------------------------------------------------------
>
> I loaded Name: ConfigurationOfSeaside3-JohanBrichau.335 [1]
>
> There I read the message #baseline320: spec [2]
>
> It told me that I need probably only need   #baseline320common: spec.  [3]
>
>
>
> The interesting part in  is #baseline320common: spec
>
>
> 	package: 'Seaside-Canvas' with: [
> 				spec requires: #('Seaside-Core' ). ];
> 			package: 'Seaside-Component' with: [
> 				spec requires: #('Seaside-Core' ). ];
> 			package: 'Seaside-Core' with: [
> 				spec requires: #('Grease' ). ];
>
> So I went for Grease ConfigurationOfGrease-JohanBrichau.345 [4] which
> I loaded manually.
>
> (ConfigurationOfGrease project version: #stable) load
>
>
> Then I manually loaded
> - Seaside-Core and
> - Seaside-Canvas
>
> from
>
> MCHttpRepository
> 	location: 'http://smalltalkhub.com/mc/Seaside/Seaside32/main'
> 	user: ''
> 	password: ''
>
>
> A test showed that this is not sufficient.
>
> Print-it of
>     WAHtmlCanvas builder render: [ :html |
> 		html unorderedList: [
> 			html listItem: 'an item' ]]
>
>
> was
>
>     '[closure] in UndefinedObject&gt;&gt;DoIt'
>
>
> I wonder what I am missing here or what I need in addition.
>
> Regards
> Hannes
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----------------------------------------------------------------------------------------------------------------
>
> [1]
>
> Name: ConfigurationOfSeaside3-JohanBrichau.335
> Author: JohanBrichau
> Time: 14 July 2017, 10:34:35.516326 am
> UUID: 7fdfd376-538a-408a-9aab-5573418cd3a8
> Ancestors: ConfigurationOfSeaside3-JohanBrichau.334
>
> bugfix release 3.2.4
>
> -----------------------------------------
> [2] baseline320: spec
>   "This groups all baseline"
>
>   <version: '3.2.0-baseline'>
>
>   self baseline320common: spec.
>   self baseline311gemstone: spec.
>   self baseline320pharo: spec.
>   self baseline320squeak: spec.
>   self baseline312slime: spec.
>   self baseline320filesystem: spec.
>   self baseline320adaptors: spec.
>   self baseline311comet: spec.
>   self baseline311javascript: spec.
>   self baseline311jquery: spec.
>   self baseline311jqueryui: spec.
>   self baseline311rss: spec.
>   self baseline320rest: spec.
>   self baseline311scriptaculous: spec.
>   self baseline311json: spec.
>   self baseline311ob: spec.
>   self baseline320gettext: spec.
>   self baseline320welcome: spec.
>   self baseline320security: spec
>
>
> ----------------------------------------------
>
> [3]
>
> baseline320common: spec
>
> 	spec for: #'squeakCommon' do: [
> 		 spec blessing: #'baseline'.
>  		spec repository: 'http://smalltalkhub.com/mc/Seaside/Seaside32/main'.
> 		spec project: 'Grease' with: [
> 			spec
> 				versionString: #bleedingEdge;
> 				className: 'ConfigurationOfGrease';
> 				loads: #( 'Grease-Core');
> 				repository:
> 'http://smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main' ].
> 			
> 		spec project: 'Parasol' with: [
> 			spec
> 				className: 'ConfigurationOfParasol';
> 				versionString: #development;
> 				repository: 'http://ss3.gemtalksystems.com/ss/Parasol'].
> 			
> 		spec
> 			project: 'Grease Core Tests'
> 			copyFrom: 'Grease' with: [
> 				spec loads: #('Core Tests') ].
> 			
> 		spec
> 			package: 'Seaside-Canvas' with: [
> 				spec requires: #('Seaside-Core' ). ];
> 			package: 'Seaside-Component' with: [
> 				spec requires: #('Seaside-Core' ). ];
> 			package: 'Seaside-Core' with: [
> 				spec requires: #('Grease' ). ];
> 			package: 'Seaside-Development' with: [
> 				spec requires: #('Seaside-Tools-Web' 'Seaside-Flow'). ];
> 			package: 'Seaside-Email' with: [
> 				spec requires: #('Seaside-Core' ). ];
> 			package: 'Seaside-Environment' with: [
> 				spec requires: #('Seaside-Core' 'Seaside-Canvas' 'Seaside-Session'
> 'Seaside-Component' 'Seaside-RenderLoop' 'Seaside-Tools-Core'
> 'Seaside-Widgets' ). ];
> 			package: 'Seaside-Examples' with: [
> 				spec requires: #('Seaside-Component' 'Seaside-Canvas'
> 'Seaside-Tools-Core' 'Seaside-Development' 'JQuery-Core'). ];
> 			package: 'Seaside-Flow' with: [
> 				spec requires: #('Seaside-Core' 'Seaside-Component'
> 'Seaside-RenderLoop' 'Seaside-Tools-Core' ). ];
> 			package: 'Seaside-InternetExplorer' with: [
> 				spec requires: #('Seaside-Core' ). ];
> 			package: 'Seaside-RenderLoop' with: [
> 				spec requires: #('Seaside-Component' 'Seaside-Session' ). ];
> 			package: 'Seaside-Session' with: [
> 				spec requires: #('Seaside-Core' 'Seaside-Canvas' ). ];
> 			package: 'Seaside-Tools-Core' with: [
> 				spec requires: #('Seaside-Core' 'Seaside-Component'
> 'Seaside-RenderLoop' 'Seaside-Session' ). ];
> 			package: 'Seaside-Tools-Web' with: [
> 				spec requires: #('Seaside-Tools-Core' 'Seaside-RenderLoop'
> 'Seaside-Widgets' ). ];
> 			package: 'Seaside-Widgets' with: [
> 				spec requires: #('Seaside-Component' 'Seaside-Canvas' ). ];
> 			package: 'Seaside-Tests-Canvas' with: [
> 				spec requires: #('Seaside-Tests-Core' 'Seaside-Canvas' ). ];
> 			package: 'Seaside-Tests-Component' with: [
> 				spec requires: #('Seaside-Component' 'Seaside-Tests-Core' ). ];
> 			package: 'Seaside-Tests-Core' with: [
> 				spec requires: #('Seaside-Core' 'Grease Core Tests' ). ];
> 			package: 'Seaside-Tests-Development' with: [
> 				spec requires: #('Seaside-Development' 'Seaside-Tests-Tools-Web'
> 'Seaside-Tests-Environment' ). ];
> 			package: 'Seaside-Tests-Email' with: [
> 				spec requires: #('Seaside-Email' 'Seaside-Tests-Core' ). ];
> 			package: 'Seaside-Tests-Environment' with: [
> 				spec requires: #('Seaside-Environment' 'Seaside-Tests-Component'
> 'Seaside-Tests-RenderLoop' 'Seaside-Tests-Session'
> 'Seaside-Tests-Canvas' ). ];
> 			package: 'Seaside-Tests-Examples' with: [
> 				spec requires: #('Seaside-Examples' 'Seaside-Tests-Environment' ). ];
> 			package: 'Seaside-Tests-Flow' with: [
> 				spec requires: #('Seaside-Flow' 'Seaside-Tests-Functional' ). ];
> 			package: 'Seaside-Tests-Functional' with: [
> 				spec requires: #('Seaside-Environment' 'Seaside-Tests-Core'
> 'Seaside-Widgets' ). ];
> 			package: 'Seaside-Tests-InternetExplorer' with: [
> 				spec requires: #('Seaside-InternetExplorer' 'Seaside-Tests-Core' ). ];
> 			package: 'Seaside-Tests-RenderLoop' with: [
> 				spec requires: #('Seaside-RenderLoop' 'Seaside-Tests-Session' ). ];
> 			package: 'Seaside-Tests-Session' with: [
> 				spec requires: #('Seaside-Tests-Core' 'Seaside-Session'
> 'Seaside-Tests-Canvas'). ];
> 			package: 'Seaside-Tests-Tools-Web' with: [
> 				spec requires: #('Seaside-Tools-Web' 'Seaside-Tests-Environment' ). ];
> 			package: 'Seaside-Tests-UTF8' with: [
> 				spec requires: #('Seaside-Tests-Core' ) ];
> 			package: 'Seaside-Tests-Webdriver' with: [
> 				spec requires: #('Seaside-Tests-Core' 'Parasol') ].
> 		spec
> 			group: 'default' with: #('Core' 'JSON' 'Email' 'Javascript'
> 'JQuery' 'JQueryUI');
> 			group: 'OneClick' with: #('Tests' 'Development');
> 			group: 'CI' with: #('Tests' 'Development Tests');
> 			group: 'Core' with: #('Seaside-Core' 'Seaside-Canvas'
> 'Seaside-Session' 'Seaside-Component' 'Seaside-RenderLoop'
> 'Seaside-Tools-Core' 'Seaside-Flow' 'Seaside-Environment'
> 'Seaside-Widgets' );
> 			group: 'Tests' with: #('Core' 'Seaside-Tests-Core'
> 'Seaside-Tests-Canvas' 'Seaside-Tests-Session'
> 'Seaside-Tests-Component' 'Seaside-Tests-RenderLoop'
> 'Seaside-Tests-Environment' 'Seaside-Tests-Flow' 'Seaside-Tests-UTF8'
> 'Seaside-Tests-InternetExplorer' 'Seaside-Tests-Email'
> 'Seaside-Tests-Examples' 'RSS Tests' 'Welcome Tests' 'Comet Tests'
> 'REST Tests' 'Swagger Tests');
> 			group: 'Development' with: #('Core' 'Seaside-Development' );
> 			group: 'Development Tests' with: #('Development' 'Core'
> 'Seaside-Tests-Development');
> 			group: 'Email' with: #('Seaside-Email');
> 			group: 'Examples' with: #('Core' 'Seaside-Examples' );
> 			group: 'Base' with: #('Core')  ].
>
> ----------------------------------------
> [4]
> Name: ConfigurationOfGrease-JohanBrichau.345
> Author: JohanBrichau
> Time: 19 September 2017, 10:12:38.403028 am
> UUID: 6daecd28-e815-0d00-aabb-64700eaf75ef
> Ancestors: ConfigurationOfGrease-JohanBrichau.344
>
> Symbolic names should be symbols
>
> ------------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
> On 9/14/17, H. Hirzel <[email protected]> wrote:
>> Hello
>>
>> Is there a ConfigurationOf ... file which loads what is needed to run
>> WABuilder with WAHtmlCanvas  [1] stand-alone (no need other Seaside
>> package loaded)  to generate HTML Seaside style?
>>
>> If not which packages of the Seaside distribution would I need to load
>> manually?
>>
>> Recently there was a request on the Pharo list for this.
>>
>> Thank you in advance.
>>
>> Hannes
>>
>>
>> ------------------------------------------------
>> [1]
>>
>>  WAObject subclass: #WABuilder
>> 	instanceVariableNames: 'fullDocument rootBlock rootClass
>> documentClass scriptGeneratorClass rendererClass codec actionUrl
>> resourceUrl'
>> 	classVariableNames: ''
>> 	poolDictionaries: ''
>> 	category: 'Seaside-Core-Rendering'
>>
>>
>>
>> This is a convenience class which provides a result of a rendering
>> operation as a string. It is expected to be used like this:
>>
>>  WAHtmlCanvas builder render: [ :html |
>> 	html anchor
>> 		url: 'htttp://www.seaside.st';
>> 		with: 'Seaside Homepage' ]
>>
>>
>> ..................
>>
>> WABuilderCanvasTest has more examples.
>>
>>
>> testBody
>> 	| actual |
>> 	actual := WAHtmlCanvas builder render: [ :html |
>> 		html unorderedList: [
>> 			html listItem: 'an item' ] ].
>> 	self assert: actual = '<ul><li>an item</li></ul>'
>>
>>
>> testFullDocument
>> 	| actual |
>> 	actual := WAHtmlCanvas builder fullDocument: true; render: [ :html |
>> 		html unorderedList: [
>> 			html listItem: 'an item' ] ].
>> 	self assert: actual = '<html><head><title></title></head><body
>> onload="onLoad()"><ul><li>an item</li></ul><script
>> type="text/javascript">function onLoad(){};</script></body></html>'
>>
>>
>> testFullDocumentWithBlock
>> 	| actual |
>> 	actual := WAHtmlCanvas builder fullDocument: true;
>> 		rootBlock: [ :root |
>> 			root title: 'title'.
>> 			root stylesheet add: 'body{font-size:12px;}'.
>> 			root javascript add: 'alert("loaded")' ];
>> 		render: [ :html |
>> 			html unorderedList: [
>> 				html listItem: 'an item' ] ].
>> 	self assert: actual =  '<html><head><title>title</title><style
>> type="text/css">body{font-size:12px;}</style><script
>> type="text/javascript">alert("loaded")</script></head><body
>> onload="onLoad()"><ul><li>an item</li></ul><script
>> type="text/javascript">function onLoad(){};</script></body></html>'
>>
>

_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Seaside_Standalone_HTML_Screenshot_2017-09-19.png (image/png, 28.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.