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

Lawson English lenglish5 at cox.net
Wed Aug 4 07:54:25 UTC 2010


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!


More information about the seaside mailing list