[Seaside] really simple JQuery slider/widget example withoutthe support of the test classes?

Lawson English lenglish5 at cox.net
Wed Aug 4 08:10:36 UTC 2010


On 8/4/10 12:59 AM, Boris Popov, DeepCove Labs (YVR) wrote:
>
> Restarting the image does not #initialize classes, run the code 
> manually and see if that helps.
>

In a workspace:

ExampleJQSlider initialize.

I actually downloaded a pristine copy and filed-in the JQuery-Example.st 
file.

Then did: ExampleJQSlider initialize.

http://localhost:8080/exampleslider source:

<div id="id8"></div>


HOWEVER, the Safari View => View Source   window shows:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html 
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 
lang="en"><head><title>Seaside</title><meta http-equiv="Content-Type" 
content="text/html;charset=utf-8"/><meta 
http-equiv="Content-Script-Type" content="text/javascript"/><script 
type="text/javascript" 
src="/files/JQDeploymentLibrary/jQuery.js"></script><script 
type="text/javascript" 
src="/files/JQUiDeploymentLibrary/jQueryUi.js"></script><link 
rel="stylesheet" type="text/css" 
href="/files/WADevelopmentFiles/development.css"/></head><body><div 
id="id3"></div><div class="wa-toolbar"><a 
class="wa-newsessiontoolplugin" 
href="/exampleslider?_s=3R-iBNrbxKbZAHd-&amp;_k=Mut0cloQ2HlSVeJK&amp;4">New 
Session</a> <a class="wa-configuretoolplugin" 
href="/exampleslider?_s=3R-iBNrbxKbZAHd-&amp;_k=Mut0cloQ2HlSVeJK&amp;5">Configure</a> 
<a class="wa-togglehalostoolplugin" 
href="/exampleslider?_s=3R-iBNrbxKbZAHd-&amp;_k=Mut0cloQ2HlSVeJK&amp;6">Halos</a> 
<a class="wa-profilertoolplugin" 
href="/exampleslider?_s=3R-iBNrbxKbZAHd-&amp;_k=Mut0cloQ2HlSVeJK&amp;7">Profile</a> 
<a class="wa-memorytoolplugin" 
href="/exampleslider?_s=3R-iBNrbxKbZAHd-&amp;_k=Mut0cloQ2HlSVeJK&amp;8">Memory</a> 
<a class="wa-validatetoolplugin" title="Validate XHTML" 
href="http://validator.w3.org/check/referer">XHTML</a> <span 
class="wa-timingtoolplugin"><span title="Callback Time">0</span>/<span 
title="Render Time">0</span> ms</span></div><script 
type="text/javascript">/*<![CDATA[*/$(function(){$("#id3").slider({"value":50,"change":function(){$.ajax({"url":"/exampleslider","data":["_s=3R-iBNrbxKbZAHd-","_k=Mut0cloQ2HlSVeJK","1","2="+$(this).slider("value")].join("&")})}});});/*]]>*/</script></body></html>

> -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: Wed Aug 04 00:54:25 2010
> Subject: Re: [Seaside] really simple JQuery slider/widget example 
> withoutthe    support of the test classes?
>
> On 8/4/10 12:43 AM, Nick Ager wrote:
> > Is the initialize method on the class side?
> > If so it it won't be executed until the code is reloaded so call it
> > manually: MyClass initialize
> >
>
>   saved and restarted.
>
> STILL getting a blank page.
>
>
> WAComponent subclass: #ExampleJQSlider
>      instanceVariableNames: 'count current'
>      classVariableNames: ''
>      poolDictionaries: ''
>      category: 'JQuery-Examples'!
>
> !ExampleJQSlider methodsFor: 'initialization' stamp: 'LDE 8/4/2010 00:31'!
> initialize
>     super initialize.
>     current := 50.
> ! !
>
>
> !ExampleJQSlider methodsFor: 'rendering' stamp: 'LDE 8/3/2010 23:30'!
> renderContentOn: html
>      html div script: (html jQuery new slider
>        value: current;
>       onChange: (html jQuery ajax
>           callback: [ :value | current := value asNumber ]
>         value: (html jQuery this slider getValue)))
> ! !
>
> "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
>
> ExampleJQSlider class
>      instanceVariableNames: ''!
>
> !ExampleJQSlider class methodsFor: 'class initialization' stamp: 'LDE
> 8/4/2010 00:28'!
> initialize
>      | application |
>      application := WAAdmin register: self asApplicationAt: 
> 'exampleslider'.
>      application preferenceAt: #scriptGeneratorClass put: 
> JQScriptGenerator.
>      application
>          addLibrary: JQDeploymentLibrary;
>          addLibrary: JQUiDeploymentLibrary
> ! !
>
> ExampleJQSlider initialize!
> _______________________________________________
> 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/20100804/ff94cb07/attachment.htm


More information about the seaside mailing list