Controlling NSOutlineView selection after an Alert panel?
Controlling NSOutlineView selection after an Alert panel?
- Subject: Controlling NSOutlineView selection after an Alert panel?
- From: John Nairn <email@hidden>
- Date: Tue, 28 May 2002 10:20:39 -0600
My application has an outline view where users can select some subset of
data to edit in a text view. If they make an error entering data, my
delegate method
- (BOOL)selectionShouldChangeInOutlineView:(NSOutlineView *)outlineView
finds the error end prevents a new selection until the error is fixed.
It all works fine unless I put up an alert panel explaining the error.
If that is done, the selection does not change right away, but the very
next mouse click in the window with the outline view and the text view
allows the previous selection change to proceed anyway. In other words,
I return NO and the selection does not change, but the next event
invokes another selectionShouldChangeInOutlineView requesting the
rejected change a second time. If I do not reject it, the selection
changes; if I reject it again, there can be an endless loop. (other
info: after the first rejection, the selections of the NSOutlineView are
not correct. The item I did not allow to become deselected is correctly
still selected, but the selection that was told not to occur is half
selected - i.e. the selection hilighting was not done correctly).
Any ideas? The alert panel is put up in my delegate routine.
----------------
John Nairn (1-801-581-3413, FAX: 1-801-581-4816)
Web page:
http://www.mse.utah.edu/~nairn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.