Hi,

I have a NSCollectionView in which selection changes are observed by a 
viewcontroller object, that will in turn change its view according to the 
nature of the selection change.

(Think of it as a image browser or something similar)

In some circumstances however, I want to alert the user before such a change 
takes place, so I determine the circumstance and if applicable display a sheet 
using NSAlert. (For instance, if the current image has changed, I want to alert 
the user he is about to loose the changes he made to the image).

If the user acknowledges the change, everything is fine and the viewcontroller 
changes its view as desired (eg. display the next image).

BUT, if the user cancels the action, I would also like to cancel the selection 
change in the nscollectionview. Here, I'm getting in a catch-22 situation 
because restoring the 'previous' selection of the nscollectionview, will again 
trigger the observing viewcontroller, etc.

Does anyone have some suggestions about how to solve this in an elegant way?
Thanks,

-- 
Luc Van Bogaert




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to