Message 1 of 5
Veto functionality bug?
Not applicable
09-29-2005
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
Has anyone had any luck calling the Veto method in the DocumentLockModeChanged event? I'm trying to cancel the user's EATTEDIT command for some particular blocks. So in the DocumentLockModeChanged event I check for that command and block and then call e.Veto(). It doesn't error out, but it also doesn't stop the command. I'm wondering if there's a bug with the veto, since I set up an event for DocumentLockModeChangeVetoed and it doesn't hit that after I call veto.
Anyone else run into this? Here's what my code looks like:
void DocumentManager_DocumentLockModeChanged(object sender, DocumentLockModeChangedEventArgs e)
{
try
{
if (e.GlobalCommandName == "EATTEDIT" && IsSpecialBlock(e.Document))
{
// Block the edit
e.Veto();
}
}
catch { }
}
Has anyone had any luck calling the Veto method in the DocumentLockModeChanged event? I'm trying to cancel the user's EATTEDIT command for some particular blocks. So in the DocumentLockModeChanged event I check for that command and block and then call e.Veto(). It doesn't error out, but it also doesn't stop the command. I'm wondering if there's a bug with the veto, since I set up an event for DocumentLockModeChangeVetoed and it doesn't hit that after I call veto.
Anyone else run into this? Here's what my code looks like:
void DocumentManager_DocumentLockModeChanged(object sender, DocumentLockModeChangedEventArgs e)
{
try
{
if (e.GlobalCommandName == "EATTEDIT" && IsSpecialBlock(e.Document))
{
// Block the edit
e.Veto();
}
}
catch { }
}