kurtiss schrieb:
> Ok, that's confusing, but here's the code:
> 
> //
> 
> var events = {};
> 
> var evid = connect(events, "mysignal", handler);
> 
> function handler()
> {
>   disconnect(evid);
>   evid = connect(events, "mysignal", handler);
> }
> 
> signal(events, "mysignal");
> 
> //
> 
> Should that create an infinite loop?  It does with MochiKit 1.4.  It
> seems that there's a lock/dirty/check mechanism in place for slots
> that are disconnected during the execution of a slot.  That mechanism
> is not in place for new connections, however.
> 
> Of course my own code is not this contrived, but this code best
> identifies my problem.  If this is the desired behavior, what's the
> best way to get around it?  Maybe a callLater?  That leaves a period
> of time where the wrong (or no) slot is connected to a signal, but
> maybe I should just ignore it because it's so small.  Thoughts?

Maybe using a callback instead is the better solution. Just set it to 
the new target of your signal inside the event handler.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to