Christiaan Hofman
2011-12-21 18:46:29 UTC
What are the appropriate times to set NSFindPboard?
I can find really very little information about this in the documentation, basically nothing, and the only sample I could find is very limited in this respect, too little to give any useful information.
Also, looking at various Apple applications I can actually find several different behaviors.
So here is my setting. A window containing searchable information, which can have a scope bar containing a search field. The scope bar can be added and removed, and searching can be done through performFindPanelAction: or buttons (more precisely an segmented control). So similar to Xcode 3's edit windows.
So there are a few things that can happen:
1. find (replace) actions, including search field action (Enter)
2. set find string (NSFindPanelActionSetFindString)
3. add scope bar
4. remove scope bar
5. window becomes key
6. window resigns key
Would the correct behavior be to update the NSFindPboard in 1, 2, 4, 5, 6? Or perhaps only when the find string is not empty? Or only at a subset of these events? Or did I forget about events that should trigger updating NSFindPboard?
thanks,
Christiaan
I can find really very little information about this in the documentation, basically nothing, and the only sample I could find is very limited in this respect, too little to give any useful information.
Also, looking at various Apple applications I can actually find several different behaviors.
So here is my setting. A window containing searchable information, which can have a scope bar containing a search field. The scope bar can be added and removed, and searching can be done through performFindPanelAction: or buttons (more precisely an segmented control). So similar to Xcode 3's edit windows.
So there are a few things that can happen:
1. find (replace) actions, including search field action (Enter)
2. set find string (NSFindPanelActionSetFindString)
3. add scope bar
4. remove scope bar
5. window becomes key
6. window resigns key
Would the correct behavior be to update the NSFindPboard in 1, 2, 4, 5, 6? Or perhaps only when the find string is not empty? Or only at a subset of these events? Or did I forget about events that should trigger updating NSFindPboard?
thanks,
Christiaan