[Proto-Scripty] Re: Queues Effects

2010-04-07 Thread C_B
Thanks for your solution! Unfortunately, i am not able to get this
work.
Firefox Debug says: start is not defined - line 1. However, i have
alredy checked all ;, ) and } but I am not able to troubleshoot.

Here is my function:

   function start(area, choice) {
   var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});

new Effect.Parallel(effects, afterFinish:  function() {
  search(area, choice, Enumerable.invoke.curry(appear).bind($
$('solution')));
});
}

Any evidence?

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-07 Thread Guillaume Lepicard
Hi

How are you calling and defining the start function ? directly in your HTML
page or through an Ajax Request ? if it is defined through an ajax request,
you must use the syntax :
var start = function() {
...
};

is there some place where we can view the page ?

And I've seen a missing dot again
 Enumerable.invoke.curry(appear).bind($$('*.*solution'))

On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:

 Thanks for your solution! Unfortunately, i am not able to get this
 work.
 Firefox Debug says: start is not defined - line 1. However, i have
 alredy checked all ;, ) and } but I am not able to troubleshoot.

 Here is my function:

   function start(area, choice) {
var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});

new Effect.Parallel(effects, afterFinish:  function() {
  search(area, choice, Enumerable.invoke.curry(appear).bind($
 $('solution')));
});
}

 Any evidence?

 --
 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Queues Effects

2010-04-07 Thread C_B

Unfortunately I am actually not able to get the site online.

I call the function like this:
div onclick=javascript:start('age', 6) id=age6
class=entryComputer/div

If I run the search() function directly in the onclick-handler it
works. However, with no fade-  appear-effects.

Maybe the following is an evidence:
Sometimes Firefox Debug says, that one ) is missing after argument
list on position new.Effect.Parallel(effects, afterFinish:**
function()


Cheers!



On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 Hi

 How are you calling and defining the start function ? directly in your HTML
 page or through an Ajax Request ? if it is defined through an ajax request,
 you must use the syntax :
 var start = function() {
 ...

 };

 is there some place where we can view the page ?

 And I've seen a missing dot again
  Enumerable.invoke.curry(appear).bind($$('*.*solution'))

 On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:
  Thanks for your solution! Unfortunately, i am not able to get this
  work.
  Firefox Debug says: start is not defined - line 1. However, i have
  alredy checked all ;, ) and } but I am not able to troubleshoot.

  Here is my function:

        function start(area, choice) {
         var effects = [];
         $$(.solution).each( function(item) {
           effects.push( new Effect.Fade(item, {sync: true}));
         });

         new Effect.Parallel(effects, afterFinish:  function() {
           search(area, choice, Enumerable.invoke.curry(appear).bind($
  $('solution')));
         });
         }

  Any evidence?

  --
  You received this message because you are subscribed to the Google Groups
  Prototype  script.aculo.us group.
  To post to this group, send email to
  prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-07 Thread Guillaume Lepicard
Yes it is !

new Effect.Parallel(effects,* {*
afterFinish:  function() {
search(area, choice,
Enumerable.invoke.curry(appear).bind($$('solution')));
}
*}* );

On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:


 Unfortunately I am actually not able to get the site online.

 I call the function like this:
 div onclick=javascript:start('age', 6) id=age6
 class=entryComputer/div

 If I run the search() function directly in the onclick-handler it
 works. However, with no fade-  appear-effects.

 Maybe the following is an evidence:
 Sometimes Firefox Debug says, that one ) is missing after argument
 list on position new.Effect.Parallel(effects, afterFinish:**
 function()


 Cheers!



 On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
 wrote:
  Hi
 
  How are you calling and defining the start function ? directly in your
 HTML
  page or through an Ajax Request ? if it is defined through an ajax
 request,
  you must use the syntax :
  var start = function() {
  ...
 
  };
 
  is there some place where we can view the page ?
 
  And I've seen a missing dot again
   Enumerable.invoke.curry(appear).bind($$('*.*solution'))
 
  On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:
   Thanks for your solution! Unfortunately, i am not able to get this
   work.
   Firefox Debug says: start is not defined - line 1. However, i have
   alredy checked all ;, ) and } but I am not able to troubleshoot.
 
   Here is my function:
 
 function start(area, choice) {
  var effects = [];
  $$(.solution).each( function(item) {
effects.push( new Effect.Fade(item, {sync: true}));
  });
 
  new Effect.Parallel(effects, afterFinish:  function() {
search(area, choice, Enumerable.invoke.curry(appear).bind($
   $('solution')));
  });
  }
 
   Any evidence?
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Prototype  script.aculo.us group.
   To post to this group, send email to
   prototype-scriptacul...@googlegroups.com.
   To unsubscribe from this group, send email to
   prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/prototype-scriptaculous?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Queues Effects

2010-04-07 Thread C_B
Incredible! It works! Thanks!!! Fade out and search are sucessfully
processed.

There is only one thing left: it does not appear again softly, it
seems like the effect would not run - the solution is there directly.

On 7 Apr., 12:02, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 Yes it is !

 new Effect.Parallel(effects,* {*
 afterFinish:  function() {
     search(area, choice,
 Enumerable.invoke.curry(appear).bind($$('solution')));
     }
 *}* );

 On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:

  Unfortunately I am actually not able to get the site online.

  I call the function like this:
  div onclick=javascript:start('age', 6) id=age6
  class=entryComputer/div

  If I run the search() function directly in the onclick-handler it
  works. However, with no fade-  appear-effects.

  Maybe the following is an evidence:
  Sometimes Firefox Debug says, that one ) is missing after argument
  list on position new.Effect.Parallel(effects, afterFinish:**
  function()

  Cheers!

  On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
  wrote:
   Hi

   How are you calling and defining the start function ? directly in your
  HTML
   page or through an Ajax Request ? if it is defined through an ajax
  request,
   you must use the syntax :
   var start = function() {
   ...

   };

   is there some place where we can view the page ?

   And I've seen a missing dot again
    Enumerable.invoke.curry(appear).bind($$('*.*solution'))

   On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de wrote:
Thanks for your solution! Unfortunately, i am not able to get this
work.
Firefox Debug says: start is not defined - line 1. However, i have
alredy checked all ;, ) and } but I am not able to troubleshoot.

Here is my function:

      function start(area, choice) {
       var effects = [];
       $$(.solution).each( function(item) {
         effects.push( new Effect.Fade(item, {sync: true}));
       });

       new Effect.Parallel(effects, afterFinish:  function() {
         search(area, choice, Enumerable.invoke.curry(appear).bind($
$('solution')));
       });
       }

Any evidence?

--
You received this message because you are subscribed to the Google
  Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/prototype-scriptaculous?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Prototype  script.aculo.us group.
  To post to this group, send email to
  prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-07 Thread Guillaume Lepicard
you are still missing the . css class prefix .bind($$('.solution'))

On Wed, Apr 7, 2010 at 12:09 PM, C_B i...@christian-baesler.de wrote:

 Incredible! It works! Thanks!!! Fade out and search are sucessfully
 processed.

 There is only one thing left: it does not appear again softly, it
 seems like the effect would not run - the solution is there directly.

 On 7 Apr., 12:02, Guillaume Lepicard guillaume.lepic...@gmail.com
 wrote:
  Yes it is !
 
  new Effect.Parallel(effects,* {*
  afterFinish:  function() {
  search(area, choice,
  Enumerable.invoke.curry(appear).bind($$('solution')));
  }
  *}* );
 
  On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:
 
   Unfortunately I am actually not able to get the site online.
 
   I call the function like this:
   div onclick=javascript:start('age', 6) id=age6
   class=entryComputer/div
 
   If I run the search() function directly in the onclick-handler it
   works. However, with no fade-  appear-effects.
 
   Maybe the following is an evidence:
   Sometimes Firefox Debug says, that one ) is missing after argument
   list on position new.Effect.Parallel(effects, afterFinish:**
   function()
 
   Cheers!
 
   On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
   wrote:
Hi
 
How are you calling and defining the start function ? directly in
 your
   HTML
page or through an Ajax Request ? if it is defined through an ajax
   request,
you must use the syntax :
var start = function() {
...
 
};
 
is there some place where we can view the page ?
 
And I've seen a missing dot again
 Enumerable.invoke.curry(appear).bind($$('*.*solution'))
 
On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de
 wrote:
 Thanks for your solution! Unfortunately, i am not able to get this
 work.
 Firefox Debug says: start is not defined - line 1. However, i
 have
 alredy checked all ;, ) and } but I am not able to
 troubleshoot.
 
 Here is my function:
 
   function start(area, choice) {
var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});
 
new Effect.Parallel(effects, afterFinish:  function() {
  search(area, choice,
 Enumerable.invoke.curry(appear).bind($
 $('solution')));
});
}
 
 Any evidence?
 
 --
 You received this message because you are subscribed to the Google
   Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 
   prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 prototype-scriptaculous%252bunsubscr...@googlegroups.comprototype-scriptaculous%25252bunsubscr...@googlegroups.com
 
 
 .
 For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Prototype  script.aculo.us group.
   To post to this group, send email to
   prototype-scriptacul...@googlegroups.com.
   To unsubscribe from this group, send email to
   prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
 
   .
   For more options, visit this group at
  http://groups.google.com/group/prototype-scriptaculous?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Queues Effects

2010-04-07 Thread C_B
Unfortunately that is not the mistake.
I have already corrected that.

Last version of the function:

   function start(area, choice) {
   var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});

new Effect.Parallel(effects, {afterFinish:  function() {
  search(area, choice, Enumerable.invoke.curry(appear).bind($
$('.solution')));
}});
}

On 7 Apr., 12:13, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 you are still missing the . css class prefix .bind($$('.solution'))

 On Wed, Apr 7, 2010 at 12:09 PM, C_B i...@christian-baesler.de wrote:
  Incredible! It works! Thanks!!! Fade out and search are sucessfully
  processed.

  There is only one thing left: it does not appear again softly, it
  seems like the effect would not run - the solution is there directly.

  On 7 Apr., 12:02, Guillaume Lepicard guillaume.lepic...@gmail.com
  wrote:
   Yes it is !

   new Effect.Parallel(effects,* {*
   afterFinish:  function() {
       search(area, choice,
   Enumerable.invoke.curry(appear).bind($$('solution')));
       }
   *}* );

   On Wed, Apr 7, 2010 at 11:54 AM, C_B i...@christian-baesler.de wrote:

Unfortunately I am actually not able to get the site online.

I call the function like this:
div onclick=javascript:start('age', 6) id=age6
class=entryComputer/div

If I run the search() function directly in the onclick-handler it
works. However, with no fade-  appear-effects.

Maybe the following is an evidence:
Sometimes Firefox Debug says, that one ) is missing after argument
list on position new.Effect.Parallel(effects, afterFinish:**
function()

Cheers!

On 7 Apr., 11:26, Guillaume Lepicard guillaume.lepic...@gmail.com
wrote:
 Hi

 How are you calling and defining the start function ? directly in
  your
HTML
 page or through an Ajax Request ? if it is defined through an ajax
request,
 you must use the syntax :
 var start = function() {
 ...

 };

 is there some place where we can view the page ?

 And I've seen a missing dot again
  Enumerable.invoke.curry(appear).bind($$('*.*solution'))

 On Wed, Apr 7, 2010 at 10:06 AM, C_B i...@christian-baesler.de
  wrote:
  Thanks for your solution! Unfortunately, i am not able to get this
  work.
  Firefox Debug says: start is not defined - line 1. However, i
  have
  alredy checked all ;, ) and } but I am not able to
  troubleshoot.

  Here is my function:

        function start(area, choice) {
         var effects = [];
         $$(.solution).each( function(item) {
           effects.push( new Effect.Fade(item, {sync: true}));
         });

         new Effect.Parallel(effects, afterFinish:  function() {
           search(area, choice,
  Enumerable.invoke.curry(appear).bind($
  $('solution')));
         });
         }

  Any evidence?

  --
  You received this message because you are subscribed to the Google
Groups
  Prototype  script.aculo.us group.
  To post to this group, send email to
  prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com

prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com
  prototype-scriptaculous%252bunsubscr...@googlegroups.comprototype-scriptaculous%25252bunsubscr...@googlegroups.com

  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

--
You received this message because you are subscribed to the Google
  Groups
Prototype  script.aculo.us group.
To post to this group, send email to
prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  prototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculous%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/prototype-scriptaculous?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Prototype  script.aculo.us group.
  To post to this group, send email to
  prototype-scriptacul...@googlegroups.com.
  To unsubscribe from this group, send email to
  prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are 

[Proto-Scripty] Re: Queues Effects

2010-04-06 Thread C_B
Thanks a lot! I used Guillaume's version and it works fine!
If you are able to solve my following problem regarding the same
matter, you are my hero.


I want to realize the same functionality, however with all elements of
the class solution. I read about invoke but I am not really sure
regarding your solution.
Here is my try which is not working:

$$('solution').invoke('fade',({afterFinish: search(area, choice,
Element.appear.curry($$('solution').invoke))}));


(area and choice are parameters of a own function called search)


Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-06 Thread Guillaume Lepicard
Hi,
I guess that you want to fade all items with class solution (you are missing
the dot class prefix) and on the afterFinish, you want to run a function
that has as third parameter a callback function ? Because the way you had
wrote it meant that your owned function *search* returned a function to be
used after effect finished...

It would have been something like
$$('.solution').invoke('fade',({afterFinish: function() {
  search(area,
choice, Enumerable.invoke.curry(appear).bind($$('solution')) }));

But i'm afraid it won't be good : by calling invoke, you will call the fade
method on each item of your $$('.solution'), and after each fade, the search
function will be run so the appear function will be runned on all
$$(.solution) items after each search of each fade...

Am i understandable :-/ ?


On Tue, Apr 6, 2010 at 3:20 PM, C_B i...@christian-baesler.de wrote:

 Thanks a lot! I used Guillaume's version and it works fine!
 If you are able to solve my following problem regarding the same
 matter, you are my hero.


 I want to realize the same functionality, however with all elements of
 the class solution. I read about invoke but I am not really sure
 regarding your solution.
 Here is my try which is not working:

 $$('solution').invoke('fade',({afterFinish: search(area, choice,
 Element.appear.curry($$('solution').invoke))}));


 (area and choice are parameters of a own function called search)


 Thanks in advance!

 --
 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Re: Queues Effects

2010-04-06 Thread C_B
Hi,

yes you are. I already had the problem described.

In fact, the following works fine:

a href=# onclick=$$('.solution').invoke('fade',{ duration:
0.8, from: 1, to: 0 });Fade/a
a href=# onclick=$$('.solution').invoke('appear',{ delay:
0.35 });return false;Appear/a

All elements of the class solution fade and appear at the same time,
not one after another.
Now I want to do the following using a function:

1. fade all elements of the class solution synchronously (like in the
a href above)
2. run owned function search(area, choice) which sets some cookies and
does some AJAX changing content of all elements of the class
solution
3. appear all elements of the class solution synchronously (like in
the a href above)

I have alredy tried doing this by using queues but it does not work -
as described in my first post, all tasks were done synchronously .
Now, your version works fine with IDs. So i hope, it also fits to
elements of classes.

Hope you get me?


Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Re: Queues Effects

2010-04-06 Thread Guillaume Lepicard
Hi again,

I understand what you want, but the problem this time is that you
are dealing with several elements.
When calling invoke, it is just as if you were looping on each item of your
Enumerable and calling the invoked method for each of them, with all
parameters - that is to say with afterFinish callback for each of them. In
other words, afterFinish callback will be called for each item being fade.
your function will be called after each fade which is not what you want.

The only solution I can think about is to loop on your items, build an array
of effects with the sync option, then run the array of effects using an
Effect.Parallel which will be the only one with an afterFinish:

var effects = [];
$$(.solution).each( function(item) {
  effects.push( new Effect.Fade(item, {sync: true}));
});
new Effect.Parallel(effects, afterFinish:  function() {
  search( area, choice, Enumerable.invoke.curry(appear).bind(
$$('solution') ) )
});


On Tue, Apr 6, 2010 at 5:27 PM, C_B i...@christian-baesler.de wrote:

 Hi,

 yes you are. I already had the problem described.

 In fact, the following works fine:

a href=# onclick=$$('.solution').invoke('fade',{ duration:
 0.8, from: 1, to: 0 });Fade/a
a href=# onclick=$$('.solution').invoke('appear',{ delay:
 0.35 });return false;Appear/a

 All elements of the class solution fade and appear at the same time,
 not one after another.
 Now I want to do the following using a function:

 1. fade all elements of the class solution synchronously (like in the
 a href above)
 2. run owned function search(area, choice) which sets some cookies and
 does some AJAX changing content of all elements of the class
 solution
 3. appear all elements of the class solution synchronously (like in
 the a href above)

 I have alredy tried doing this by using queues but it does not work -
 as described in my first post, all tasks were done synchronously .
 Now, your version works fine with IDs. So i hope, it also fits to
 elements of classes.

 Hope you get me?


 Cheers!

 --
 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.