[Seaside] JSObject printOn:

Lukas Renggli renggli at gmail.com
Thu Dec 24 10:39:52 UTC 2009


I renamed #printOn: and #printContentOn: to #javascriptOn: and
#javascriptContentOn: in subclasses of JSObject with the latest commit
series. All functional tests and examples continue to work. People
that subclassed JSObject in external projects need to perform that
renaming too, otherwise their code will break.

Lukas

2009/12/24 Stan Shepherd <stan.shepherd414 at gmail.com>:
>
>
> Stan Shepherd wrote:
>>
>>
>> Lukas Renggli wrote:
>>>
>>> Also it makes it possible to use any objects (like strings themselves)
>>> can be added as load scripts.
>>>
>> So would the following be a valid comment for #addLoadScript:?
>>
>>  addLoadScript: anObject
>>       "anObject is any object which replies to #printOn: with valid javascript.
>>       usually it will be a JSObject or a string.
>>       example:
>>       html document
>>               addLoadScript: 'message()'.
>>       will render:
>>       <script type="text/javascript">/*<![CDATA[*/function
>> onLoad(){message()}/*]]>*/</script>"
>>
>>         loadScripts := loadScripts copyWith: anObject.
>>         ^ anObject
>>
>> Cheers,   ...Stan
>>
>>
>
>
> Along the same lines,
> WAScriptTag>>with: aString
>        self attributes
>                at: 'type'
>                ifAbsentPut: [ 'text/javascript' ].
>        super with:
>                [ aString isNil ifFalse: [ self document nextPutAll: aString greaseString
> ] ]
>
> is called by
> WAHtmlCanvas>>script: aBlock
>        self script with: aBlock
>
> so the parameter changes from Block to String in the passing. Am I right in
> thinking aBlock should be aString?
> ...Stan
>
>
> --
> View this message in context: http://n4.nabble.com/JSObject-printOn-tp976924p978210.html
> Sent from the Squeak - Seaside mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list