There's a patch that does just that - allows an Effect to produce a
reusable instance. http://dev.rubyonrails.org/ticket/11054

- kangax

On Apr 9, 2:22 pm, dashifen <[EMAIL PROTECTED]> wrote:
> That is what I'm doing, but the function creates a new Effect object
> every time the function is called.  I'm not sure if there's a way to
> instantiate one Effect object and re-use it consistently rather than
> making new ones.
>
>  - Dave -
>
> On Apr 9, 1:00 pm, Diodeus <[EMAIL PROTECTED]> wrote:
>
> > Why not have the effect in a function and just call the function again
> > in afterFinish instead of nesting them?
>
> > On Apr 9, 1:34 pm, dashifen <[EMAIL PROTECTED]> wrote:
>
> > > I'm working on creating a small progress meter using Scriptaculous and
> > > the behavior of that meter is such that when it reaches 100% an action
> > > occurs and then it returns to 0% and starts over again.  I thought
> > > that it might be as simple as setting a function to the objects
> > > afterFinish property that would reset the bar's position and then call
> > > the effect's start() method.
>
> > > For now, I've been able to produce the effect I need by creating a new
> > > Effect within the afterFinish handler of the old one, but I'm worried
> > > that this could make browsers suffer a slow and grueling death as
> > > these objects are created in memory.  Is there a better way?
>
> > > David Kees
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to