Community
Showing results for 
Search instead for 
Do you mean 
Reply

Any way to verify whether a Command URN has been registered?

Copper Contributor
Posts: 14
Country: United States

Any way to verify whether a Command URN has been registered?

Custom commands can be "registered" to ACT by specifying a unique URN (key) and an associated ComandHandler delegate method.  This feature is most commonly used to register a command handler (Click handler) for a custom menu item.

 

Registration is performed by calling the RegisterCommand() method in the ActApplication class.  Commands are removed from registration using RevokeCommand().

 

Does anyone know of a way to "validate" whether a given URN has been previously registered?

 

ACT must keep some sort of internal collection to track registered commands.  Is that collection accessible from code?   I guess I am looking for something lke a "RegisteredCommandsCollection.Contains(string)" method that returns a bool..

 

Thanks for any help.

 

Steve

 

Employee
Posts: 34
Country: USA

Re: Any way to verify whether a Command URN has been registered?

I belieive you are looking for public bool IsCommandRegistered(string command) in actApplication.