[Seaside] jQuery expressions

Boris Popov, DeepCove Labs (SNN) boris at deepcovelabs.com
Thu Aug 19 20:23:36 UTC 2010


Fair enough! Just wanted to make sure I wasn't overlooking an obvious approach.

-Boris (via BlackBerry)

----- Original Message -----
From: seaside-bounces at lists.squeakfoundation.org <seaside-bounces at lists.squeakfoundation.org>
To: Seaside - general discussion <seaside at lists.squeakfoundation.org>
Sent: Thu Aug 19 13:22:40 2010
Subject: Re: [Seaside] jQuery expressions

On 19 August 2010 22:15, Boris Popov, DeepCove Labs (SNN)
<boris at deepcovelabs.com> wrote:
> Ah, wonderful, thanks. Are there any more examples available somewhere
> showing generic application of javascript generation in Smalltalk? Not
> jQuery, specifically, but rather Javascript-Core et al, say,
>
> 'return val != ""' asFunction: #('val')

That's kind of hard to do.

I usually suggest to try to factor out more complicated functions to
an external Javascript file and just call them from Seaside. The code
generation is really not designed for arbitrary expressions, although
that would be an interesting project.

Lukas


>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
>
> boris at deepcovelabs.com
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
>
>
> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org on behalf of Lukas Renggli
> Sent: Thu 8/19/2010 9:12 PM
> To: Seaside - general discussion
> Subject: Re: [Seaside] jQuery expressions
>
> html jQuery new alias: 'el'; closest: 'div.row'; find: 'div.status';
> find: 'p'; hide; end; find: 'p.value'; show; asFunction: #('el')
>
> On 19 August 2010 22:06, Boris Popov, DeepCove Labs (SNN)
> <boris at deepcovelabs.com> wrote:
>> How would I go about expressing the following in Smalltalk,
>>
>>
>> 'el.closest("div.row").find("div.status").find("p").hide().end().find("p.valid").show()'
>>         asFunction: #('el')
>>
>> I can't seem to figure out a way of instantiating JQueryInstance that
>> would
>> print itself as simply el or even $(el)...
>>
>> -Boris
>>
>> --
>> +1.604.689.0322
>> DeepCove Labs Ltd.
>> 4th floor 595 Howe Street
>> Vancouver, Canada V6C 2T5
>>
>> boris at deepcovelabs.com
>>
>> CONFIDENTIALITY NOTICE
>>
>> This email is intended only for the persons named in the message
>> header. Unless otherwise indicated, it contains information that is
>> private and confidential. If you have received it in error, please
>> notify the sender and delete the entire message including any
>> attachments.
>>
>> Thank you.
>>
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



-- 
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100819/78c5fdb8/attachment.htm


More information about the seaside mailing list