[Seaside] still struggling with the confusing scripting API's
johan at inceptive.be
Fri Oct 30 19:49:34 UTC 2015
There’s a better version:
with the implementation of JSObject>>createWithArguments as follows:
(self apply: aCollection) create
We could add these to Seaside 3.2
I think they make sense for generating those pieces of code in a more succinct way.
> On 30 Oct 2015, at 20:45, Johan Brichau <johan at inceptive.be> wrote:
> Hi Chris,
> It is *possible*:
> I believe it was never intended to cover the complete language either. We can, of course, always extend the possibilities.
> I would definitely opt for this version:
> Alternatively, the following is possible by adding a simple convenience method:
> With JSObject>>create:withArguments: implemented as:
> create: anObject withArguments: aCollection
> "new <anObject>(<aCollection>)"
> ^ (anObject apply: aCollection) create
> Depending on your use case, the other options are:
> Hope this helps
>> On 30 Oct 2015, at 17:52, Chris Muller <ma.chris.m at gmail.com> wrote:
>> I'm still trying to get my head around "what is the best way to write
>> failed to write the simplest expression via an aggregation of
>> Seaside's JSDecoration's. This is what I want to render:
>> Using Seasides various brushes and canvas API, I could not even get
>> the first two words right. I tried:
>> Its almost like there is a missing JSDecoration or capability missing
>> from JSStatement..?
>> After throwing up my hands with that, I decided to try "hard coding"
>> htmlId),'") ])
>> which produces:
>> So that is pretty much what I want, but see that it is escaping the
>> quote characters, which makes it hard to read in the browser. Are
>> those necessary or is there some way to avoid that?
>> strings into my Smalltalk code. Any advice is appreciated.
>> - Chris
>> PS -- I think the inconsistency of the API is part of my struggle.
>> JSObject script: can accept a Block, and WAHtmlCanvas>>#script: SAYS
>> it takes "aBlock", but that HAS to be wrong, because
>> WAScriptTag>>#with: ends up writing the Block's "greaseString" to the
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
More information about the seaside