[Seaside] Re: really simple JQuery slider/widget example without
the support of the test classes?
lenglish5 at cox.net
Wed Aug 4 07:03:42 UTC 2010
On 8/3/10 11:29 PM, Andreas Raab wrote:
> On 8/3/2010 11:14 PM, Lukas Renggli wrote:
>> You can copy and paste that example, there are no other dependencies
>> but the inst-var 'current' that you should initialize with a number.
> I think he might be looking for this:
> I ran into the same issue; it is decided non-obvious that the creation
> of a component on the welcome page "magically" works but that there's
> no trace in the resulting code that reveals what one must do to to
> perform the equivalent action in code somewhere (i.e., if you create
> the very same class by hand "it doesn't work").
> I do understand why this stuff works the way it works but I think
> clarity could be dramatically improved by having something that makes
> the necessary registration explicit. Could be as simple as having the
> registration in the class initialization of components created on the
> welcome page - I certainly would've found that.
> - Andreas
I'm afraid I did that. :-(
WAAdmin register: WebCounter asApplicationAt: 'webcounter'.
WAAdmin register: ExampleJQSlider asApplicationAt: 'exampleslider'.
the webcounter app works.
the exampleslider app has the error:
'From Squeak4.1 of 17 April 2010 [latest update: #9957] on 3 August 2010
at 11:48:53 pm'!
JQSlider subclass: #ExampleJQSlider
instanceVariableNames: 'count current'
!ExampleJQSlider methodsFor: 'initialization' stamp: 'LDE 8/3/2010 21:50'!
current := 50! !
!ExampleJQSlider methodsFor: 'rendering' stamp: 'LDE 8/3/2010 23:30'!
html div script: (html jQuery new slider
onChange: (html jQuery ajax
callback: [ :value | current := value asNumber ]
value: (html jQuery this slider getValue)))
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
!ExampleJQSlider class methodsFor: 'class initialization' stamp: 'LDE
WAAdmin register: self asApplicationAt: 'exampleslider'! !
On 8/3/10 11:14 PM, Lukas Renggli wrote:
> You can copy and paste that example, there are no other dependencies
> but the inst-var 'current' that you should initialize with a number.
> On Wednesday, August 4, 2010, Lawson English<lenglish5 at cox.net> wrote:
>> can anyone point to me a REALLY simple transitional example on how to
>> implement a JQuery slider? Something along the lines of the
>> webcoiunter example in the seaside book that holds my hand the entire
>> something like
>> detail of http://www.seaside.st/about/examples/counter
>> I can't figure out how to apply the
>> JQSliderFunctionalTest>>renderContentOn: method to something that
>> doesn't have the infrastructure of the test class hierarchy behind it.
>> MyTestSlider>>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)))
>> doesn't work as I haven't a clue what extra methods are required to
>> implement the functionality of the example and I can't wrap my head
>> about the multiple layers of the hierarchy to figure out how the
>> different widgets are plugged into the sample page...
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside