Changes

Jump to: navigation, search

User talk:Standard8

323 bytes removed, 19:00, 27 May 2006
Thoughts about linking views to searches: Add some thoughts after discussion on irc.
A Solution:
* When nsIAbDirectory->GetChildCards is called, if a asynchronus search is required, then return NS_ERROR_SEARCH_REQUIRED
* Provide nsIAbDirectorySearch::startSearch addResultListener/removeResultListener with a nsIAbView parameternsIAbDirectoryQueryResultListener option.* StartSearch saves Where searches are required, its up to the reference caller to the nsIAbView as a weak referencedecide if an extra listener is required or not.* nsAbLDAPDirectory::OnSearchFoundCard checks the weak reference StartSearch does what it needs to nsIAbView still exists and calls a new function OnSearchFoundCard in nsIAbView.* a StopSearch call would clear When results come in, any listeners are called with the weak referenceappropriate functions.
Notes:
* The weak reference for the nsIAbView may be better held in nsAbDirSearchListener (depending on the precise relationship between nsIAbView & nsIAbDirectory)
* I think a weak reference may be best as the nsIAbView could be deleted by switching to another view. It'll also me were less likely to get into refcount loops.
* The solution would pave the way for full fixes to [https://bugzilla.mozilla.org/show_bug.cgi?id=135231 bug 135231] (LDAP Quick search results keep duplicating with searches in Address Book, Select Addresses dialog and Sidebar) and [https://bugzilla.mozilla.org/show_bug.cgi?id=327269 bug 327269] (UI lacks proper progress indication for lookups)
Canmove, confirm, emeritus
3,627
edits

Navigation menu