How can I capture change events for the contents of the Swatches panel?
When a swatch is added to or removed from the Swatches panel in the document workspace, I need to capture this event.
Which protocol should I observe?
In my observer implementation, I attached like this:
InterfacePtr<ISubject> wsSubject(workspaceRef, IID_ISUBJECT);
wsSubject->AttachObserver(
ISubject::kBothAttachments,
this,
IID_ISWATCHLIST,
IID_SELECTION_CHANGE_IOBSERVER
);
However, in my Update() function:
if (protocol == IID_ISWATCHLIST)
{
// never reached
}
I cannot receive any notifications at all.
What is the correct way to observe swatch creation and deletion events in the workspace?
