[Seaside] Re: SUComponent script: question
dtrussardi at tiscali.it
dtrussardi at tiscali.it
Sat Mar 20 11:48:53 UTC 2010
Hi Lukas,
in the attachment you find the class TestScript.
You can open it directly from seaside browser page link.
After with the browser inspector, you can explore the 'officeLayer' data.
You found :
[
Object
places: Array
zoom: Array
0: 0
1: 3
,
Object
]
Now add at SUAlTests initialize the new link:
initialize
super initialize.
tabs := OrderedCollection new
add: 'Welcome' -> (Array
with: 'Welcome' -> SUWelcomeTest new
with: 'Counter' -> SUCounterTest new);
add: 'Ajax' -> (Array
with: 'Updater' -> SUUpdaterTest new
with: 'Periodical' -> SUPeriodicalTest new
with: 'Evaluator' -> SUEvaluatorTest new);
with: 'Morph' -> SUMorphTest new);
..........
.........
.........
add: 'testDTR' -> (Array
with: 'test' -> TestScript new );
yourself.
selected := tabs first value
When you open the new scriptaculous entry and inspector the 'officeLayer' data, you find some other data:
Object
places: Array
zoom: Array
0: 0
1: 3
_each: function forEach() {
_reverse: function reverse() {
all: function (C, B) {C=C?C.bind(B):Prototype.K;var A=true;this.each(function(E,D){A=A&&!!C(E,D);if(!A){throw $break}});return A;}
any: function (C, B) {C=C?C.bind(B):Prototype.K;var A=false;this.each(function(E,D){if(A=!!C(E,D)){throw $break}});return A;}
clear
And it's the problem.
Thanks,
Dario
Please provide a reproduceable minimal fileout of your problem.
Cheers,
Lukas
On Wednesday, March 17, 2010, dtrussardi at tiscali.it
<dtrussardi at tiscali.it> wrote:
> Hi,
> in my applications based on seaside 2.8 i use the method script: to create the data in the page .
> aCanvas script: ' var iconData = {
> "Lg": { width: 16, height: 16 },
> "Default": { width: 24, height: 24 },
>
> };
> var officeLayer = [ { "zoom":[0,0], "places":[{"name":"Solare","icon":["Lg","house-shadow"],"posn":[45.89198705802847, 9.95023369789124],"ancor":""},{"name":"Terra","icon":["Lg","house-shadow"],"posn":[38.27268853598097, 0.703125],"ancor":""},]},{ "zoom":[1,1], "places":[{"name":"Europa","icon":["Lg","house-shadow"],"posn":[45.89198705802847, 9.95023369789124],"ancor":""},]},{ "zoom":[2,2], "places":[{"name":"Europea","icon":["Lg","house-shadow"],"posn":[48.45835188280866. .................................
>
>
>
>
> Now when i call directly my application , subclass of WAApplication, all work fine.
> The script create right data.
> For example: Objectplaces: Arrayzoom: Array0: 01: 0
>
> But when i call it from one SUComponent subclass i found some problem.
> In this case the script: add some other data to my data.
> The same upon object now is :
> Objectplaces: Arrayzoom: Array0: 01: 0_each: function forEach() {_reverse: function reverse() {all: function (C, B) {C=C?C.bind(B):Prototype.K;var A=true;this.each(function(E,D){A=A&&!!C(E,D);if(!A){throw $break}});return A;}any: function (C, B) {C=C?C.bind(B):Prototype.K;var A=false;this.each(function(E,D){if(A=!!C(E,D)){throw $break}});return A;}clear: function () {this.length=0;return this;}............
> And this create some problem.
> Any idea about this?
> I wrong something ?
>
> Thanks,
>
> Dario
>
>
>
-------------- next part --------------
Skipped content of type multipart/mixed
More information about the seaside
mailing list