Talk:Progress listeners

From MozillaZine Knowledge Base
Jump to navigationJump to search

A note about nsISupportsWeakReference: Most if not all listeners require that you add this line in, but be careful: Make sure your listener remains in memory! If you add listeners inside a function and the variable containing your listener drops out of scope, you may find it suddenly stop working (at least I did, in particular with an nsIHistoryListener). To solve this problem, have a reference to it outside the function call. --Cidolfas