Oh, sorry for that!  I will move my posts there from now on.
Meanwhile, thanks for the help!
Karl..

On Oct 5, 2:44 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Hi Karl,
>
> These questions really belong in the end-users group.  This group is
> for discussion of core development, not usage questions.  The end-
> users group is here:http://groups.google.com/group/prototype-scriptaculous
>
> Totally up to you how you keep track, and whether you do (I'd probably
> use an array rather than a variable for each one).  Most of the time I
> find the page logic doesn't require that I track whether I'm observing
> things because I know that I am (or am not).
>
> Also, throwing it out there, issuing Event.stopObserving when you
> haven't observed is fairly harmless.  I've never had to issue one
> "blind" like that, but it just returns without doing anything if it
> doesn't find an observer to drop.
> --
> T.J. Crowder
> tj / crowder software / com
>
> On Oct 5, 1:00 am, kstubs <[EMAIL PROTECTED]> wrote:
>
> > So, just keep track of them with a typical variable?
>
> > var myElementIsObserved = false;
> > ...
> > if(! myElementIsObserved)
> > {
> >   Event.observe('myelement','focus',dosomething);
> >   myElementIsObserved == true;
>
> > }
>
> > On Oct 4, 3:33 pm, kangax <[EMAIL PROTECTED]> wrote:
>
> > > On Oct 4, 5:20 pm, kstubs <[EMAIL PROTECTED]> wrote:
>
> > > > So how do you tell if you've already registered an event to be
>
> > > It's a good idea to keep track of them : )
> > > If you are working in an unknown environment and absolutely need to
> > > know if an element is "observed" by prototype:
>
> > > Element.addMethods({
> > >   isObserved: function(element){
> > >     return ('_prototypeEventID' in $(element));
> > >   }
>
> > > });
> > > > observed?  Also, what is the penalty for not issuing a stop observe?
>
> > > Usually, increased memory usage (and probably some run time processing
> > > overhead)
>
> > > --
> > > kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to