[Seaside] Javascript calls through jQuery

Sven Van Caekenberghe sven at stfx.eu
Tue Mar 4 08:01:29 UTC 2014


On 03 Mar 2014, at 16:55, Bob Arning <arning315 at comcast.net> wrote:

> just lurking, but perhaps this is what you need:
> 
> 
> On 12/18/13 7:07 PM, Johan Brichau wrote:
> The Javascript wrappers in Seaside (JSObject subclasses) provide a number of convenience methods to achieve this.
> For example:
> 
> html script: ((html jQuery ajax callback:[ ]) asFunction assignTo: 'myfunction').
> 
> Then just call myfunction() from your javascripts.
> 
> cheers
> Johan

Someone, I think Johan (;-), has to take some time to write an 'Advanced JQuery' chapter for the Seaside book, or a whole new chapter, or new book, or whatever. There is so much to learn ... 

> 
> On 3/3/14 10:38 AM, Esteban A. Maringolo wrote:
>> The trick is in the naming of the function (and it's recurrent call
>> from within) and the #create decoration which followed by a #call: is
>> a way to implement "immediately invoked function expression" in JS
>> (IIFE for short).
>> 
>> I still have to learn how all the JavaScript/jQuery wrappers work, but
>> so far it's impressive how much you can do writing a few lines of
>> Smalltalk.
>> 
>> If there is a way of doing this without having to modify JSFunction
>> I'll be happy to use. Otherwise see attached changeset (and integrate
>> if necessary 
>> :)
>>  )
>> 
>> 
> 
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list