Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - EnableActions() problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

EnableActions() problem

 Post Reply Post Reply
Author
Message
MadRiver View Drop Down
Groupie
Groupie


Joined: 21 August 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadRiver Quote  Post ReplyReply Direct Link To This Post Topic: EnableActions() problem
    Posted: 06 November 2008 at 1:44pm
Hello,

Immediately after creating the CommandBars object I call EnableActions.

I add several Actions, and several menu items referencing the actions.

However, when I disable an action the menu item referencing that action is still enabled. Nothing happens when the user clicks on the menu item, as expected, since the Action is disabled.

Are thee other steps I have to take to update the Enabled state of all controls that refer to an Action (when the state of the Action changes)?

Thanks for advice...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2008 at 5:09am
Hi,
 
Have work automatically.
Check our Actions sample. All you need is to create actions before menu items.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MadRiver View Drop Down
Groupie
Groupie


Joined: 21 August 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadRiver Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2008 at 8:43am
Originally posted by oleg oleg wrote:

Hi,
All you need is to create actions before menu items.


This is very alarming. Are you saying that all actions must be created before menu items/toolbar controls?
That after actions are created and menu items reference them, no more actions can be added?
If so, this is a dreadful limitation.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 2:15am
I don't say this.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MadRiver View Drop Down
Groupie
Groupie


Joined: 21 August 2008
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadRiver Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 8:15am
I believe I am taking the same steps the ActionsSample program is taking:
-- Call EnableActions after creating the CommandBars control, before creating any Actions or controls.
-- Add an Action
-- Add a menu item referring to the Action

As far as I can tell, the only difference between the ActionsSample and my code is that the ActionsSample creates all the Actions before creating any menu items.
My code creates an Action, then the menu item referring to the Action; creates an Action, then a menu item; etc.
Xtreme CommandBars ActiveX v 12.1.0

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 November 2008 at 11:29am
Hi,
Lets continue in issuetrack. It have to be something in your code.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Andrew666 View Drop Down
Groupie
Groupie


Joined: 15 October 2008
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andrew666 Quote  Post ReplyReply Direct Link To This Post Posted: 28 December 2008 at 11:35am
If its of any interest, I had just the same problem --- I was using a RibbonBar with the CommandBar and I could create actions without error - but unless I created them BEFORE the ribbonbar controls, none of the action properties were executed --- i.e. I could set Enabled etc. without error, but they made no difference to the state of the control.

As soon as I created the actions before the controls, I could then do everything as per the documentation.

Regards


--Andrew
Back to Top
rmcmanamy View Drop Down
Groupie
Groupie


Joined: 02 September 2009
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote rmcmanamy Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2009 at 12:49am
I've ran into the same problem but only with the Enabled action.  Visible works fine but not enabled.  This is a huge dissapointment in the product seeing how we have hundered of controls and it's rediculous to have to add the actions first when each control is supposed to have an action to begin with.  I'm very dissapointed that this has not been resolved yet to say the least.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2009 at 11:04am
Hi,
 
Are you sure you call EnableActions before you create these controls ??
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
rmcmanamy View Drop Down
Groupie
Groupie


Joined: 02 September 2009
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote rmcmanamy Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2009 at 12:14pm
Yes.  I finally tracked it down to some code I had added in to Enable\Disable all controls.  In that I was looping through all the controls in the menu.  When I changed that to test if an action existed based on a range of my ID's then it works.  But it was strange before that it only was the Enable that didn't work, the Visible worked fine still.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.