Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Custom MYApp.OpenCmd As Default Double-Click Action
matt_woodward
Hey Guys,
I have implemented a Custom ICommand object which replaces the standard OpenCmd. The one thing I have noticed however is that the custom OpenCmd is not set as the default action when a user double-click a document. How is this configured?
As an aside, from an aesthetic point of view the new open command menu text is not in bold either. If the two issues are not interconnected, is somebody able to suggest what syntax is used to make the text bold?
Many thanks!
Matt
Find more posts tagged with
Comments
jny
Inside your ICommand_Update Method, set the status to nrDefaultCommand.
That should do it.
There used to be key inside the registry settings where you need to replace the default IManExt.OpenCmd ProgID with yours, but I don't know if that still applies in the 8.x world.
Let me know if the nrDefaultCommand does not suffice. I tested in-house that it works to double-click on the document from within both DeskSite and FileSite 8.2 SP1 to execute my custom command -- just as long as my progid has replaces the default ones.
matt_woodward
Hey jny,
That was spot on! Worked a treat.
One thing I would mention, which seems a little strange to me, is that my command status was basically inheriting the status of the original command object.
Would the original command object not have had a status of default as well then? Or is it more likely the default behaviour for the original command is recognised using a different mechanism?
Just curious, but a huge thanks for pointing me in the right direction!
Matt
jny
In DeskSite, you can configure which command to set as the default command. I believe there's a key corresponding to this configuration on the client-side machine, but I don't know where it is for 8.x if there is one. What you could probably do is to make sure that the Default Command drop-down (inside this Options dialog) has selected your command, after you have replaced the default iManExt.OpenCmd with your custom command's progid.
I don't think FileSite has this option.
Basically, when you have replaced the iManExt.OpenCmd with your progid everywhere that this is called, the IManExt source should execute your command instead of the default Open command. It should follow whatever command status you have set in your ICommand_Update Method.