Changes

Jump to: navigation, search

User talk:Standard8

1,155 bytes added, 11:59, 24 May 2006
Thoughts about linking views to searches: Add a possible solution
#* All nsIAbView items that are connected to that directory will then pick up the notification of something added and add it to thier view
#* This is wrong and causes bugs.
 
A Solution:
* When nsIAbDirectory->GetChildCards is called, if a asynchronus search is required, then return NS_ERROR_SEARCH_REQUIRED
* Provide nsIAbDirectorySearch::startSearch with a nsIAbView parameter.
* StartSearch saves the reference to the nsIAbView as a weak reference.
* nsAbLDAPDirectory::OnSearchFoundCard checks the weak reference to nsIAbView still exists and calls a new function OnSearchFoundCard in nsIAbView.
* a StopSearch call would clear the weak reference.
 
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)
== Card Pane View ==
Canmove, confirm, emeritus
3,627
edits

Navigation menu