[Seaside] Issue with JSScript code generated in a render

Julian Fitzell jfitzell at gmail.com
Fri Mar 5 22:32:28 UTC 2010


And rightly so, I might add, since millisecond is one word, not two
nor hyphenated. MilliSecond is as bad as SeaSide. :)

On Fri, Mar 5, 2010 at 10:25 PM, Julian Fitzell <jfitzell at gmail.com> wrote:
> Yes, it's lowercase everywhere else but Squeak/Pharo...
>
> On Fri, Mar 5, 2010 at 5:22 PM, John Toohey <johnptoohey at gmail.com> wrote:
>> I don't have it in mine. If I understand Grease correctly, its there
>> to provide cross-platform support for Seaside. Is asMilli[Ss]econds
>> spelled differently in various Smalltalk implementations?
>>
>> On Fri, Mar 5, 2010 at 12:12, Lukas Renggli <renggli at gmail.com> wrote:
>>>> Old:
>>>> javascriptOn: aStream
>>>>        aStream javascript: self asMilliseconds
>>>>
>>>> New:
>>>> javascriptOn: aStream
>>>>        aStream javascript: self asMilliSeconds
>>>>
>>>>
>>>> I'll let you know if the patch causes any problems, but everything
>>>> seems good now. Thanks for all your help.
>>>
>>> In my image there is #asMilliseconds in the package Grease-Pharo-Core.
>>> Maybe this is missing?
>>>
>>> Lukas
>>>
>>>
>>>
>>>>
>>>>
>>>> On Fri, Mar 5, 2010 at 10:17, John Toohey <johnptoohey at gmail.com> wrote:
>>>>> After the applying the path the first error I get (in addition to the
>>>>> Duration asMilliseconds) is MessageNotUnderstood:
>>>>> WAHtmlDocument>>scriptGenerator, this comes from JQAjax>>render:
>>>>> aRenderable on: aStream. Assume this is still because of the latest
>>>>> js-core package that I loaded earlier.
>>>>>
>>>>> On Fri, Mar 5, 2010 at 01:43, Lukas Renggli <renggli at gmail.com> wrote:
>>>>>> That loads a pretty recent version, but not the latest code.
>>>>>>
>>>>>> Just use your old image (without updating any of the Seaside packages)
>>>>>> and apply the patch I sent you, that should solve the problem.
>>>>>>
>>>>>> Lukas
>>>>>>
>>>>>> On 5 March 2010 07:37, John Toohey <johnptoohey at gmail.com> wrote:
>>>>>>> Did a full GC, and then installed this patch, however, the DNU
>>>>>>> messages were even worse. I'm going to build a new image, but is the
>>>>>>> earlier script that I posted (Gofer), not correct to install the
>>>>>>> latest seaside?
>>>>>>>
>>>>>>>        [ Gofer new
>>>>>>>                squeaksource: 'Seaside30';
>>>>>>>                package: 'LoadOrderTests';
>>>>>>>                load ]
>>>>>>>                        valueSupplyingAnswers: {
>>>>>>>                                {'Load Seaside'. true}.
>>>>>>>                                {'SqueakSource User Name'. ''}.
>>>>>>>                                {'SqueakSource Password'. ''}.
>>>>>>>                                {'Run tests'. false}.
>>>>>>>                        }
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Mar 5, 2010 at 01:11, Lukas Renggli <renggli at gmail.com> wrote:
>>>>>>>>> FIrst issue after loading the JS-Core-lr.84 was :-
>>>>>>>>>
>>>>>>>>> javascriptOn: aStream
>>>>>>>>>        aStream javascript: self asMilliseconds
>>>>>>>>> Message not Understood -> Duration >> asDuration
>>>>>>>>
>>>>>>>> That's strange.
>>>>>>>>
>>>>>>>>> Then I get a :-
>>>>>>>>>
>>>>>>>>> MessageNotUnderstood: WAHtmlDocument>>scriptGenerator
>>>>>>>>
>>>>>>>> The code depends on all the latest Seaside packages. Also you need to
>>>>>>>> flush the configuration packages and re-register all applications. If
>>>>>>>> you don't want to go through that procedure you can replace JSStream
>>>>>>>> class>>#encodeString:on: with the following code. That should also
>>>>>>>> work in older images:
>>>>>>>>
>>>>>>>> JSStream class>>#encodeString: aString on: aStream
>>>>>>>>        "Strings have a complicated encoding in Javascript, try to optimize
>>>>>>>> their serialization."
>>>>>>>>
>>>>>>>>        | char value encoded last |
>>>>>>>>        aStream nextPut: $".
>>>>>>>>        1 to: aString size do: [ :index |
>>>>>>>>                char := aString at: index.
>>>>>>>>                value := char greaseInteger.
>>>>>>>>                value < JavascriptCharacters size
>>>>>>>>                        ifFalse: [ aStream nextPut: char ]
>>>>>>>>                        ifTrue: [
>>>>>>>>                                encoded := JavascriptCharacters at: value + 1.
>>>>>>>>                                encoded isString
>>>>>>>>                                        ifTrue: [ aStream nextPutAll: encoded ]
>>>>>>>>                                        ifFalse: [
>>>>>>>>                                                "avoid that browsers mistakenly take the output as a closing tag"
>>>>>>>>                                                (last = $< and: [ char = $/ ])
>>>>>>>>                                                        ifTrue: [ aStream nextPutAll: '\/' ]
>>>>>>>>                                                        ifFalse: [ aStream nextPut: encoded ] ] ].
>>>>>>>>                last := char ].
>>>>>>>>        aStream nextPut: $"
>>>>>>>>
>>>>>>>> Lukas
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Lukas Renggli
>>>>>>>> http://www.lukas-renggli.ch
>>>>>>>> _______________________________________________
>>>>>>>> seaside mailing list
>>>>>>>> seaside at lists.squeakfoundation.org
>>>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> -JT
>>>>>>> _______________________________________________
>>>>>>> seaside mailing list
>>>>>>> seaside at lists.squeakfoundation.org
>>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Lukas Renggli
>>>>>> http://www.lukas-renggli.ch
>>>>>> _______________________________________________
>>>>>> seaside mailing list
>>>>>> seaside at lists.squeakfoundation.org
>>>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> -JT
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> -JT
>>>> _______________________________________________
>>>> seaside mailing list
>>>> seaside at lists.squeakfoundation.org
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>
>>>
>>>
>>>
>>> --
>>> Lukas Renggli
>>> http://www.lukas-renggli.ch
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>
>>
>>
>> --
>> -JT
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>


More information about the seaside mailing list