Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SCSF menu issue

    I am using SCSF from April 2008. We are using VS 2008 as 2010 is not available to us. It's a long story.

    Anyways, I have the majority of my application developed but I have a nagging problem that I have not been able to track down. My app has both a toolbar and menu.

    As near as I can tell, the sequence that occurs to fire a command is pretty much the same for a menu or a toolbar button. But, if I click a toolbar button, all is well. If I click a menu item that needs to fire the same event from a CommandHandler, it fires twice.

    To include all of my source code would not be practical and possibly a security violation, so I'll try to 'paraphrase' as best I can.

    The following is the last SCSF code that runs as expected:

    protected virtual void OnExecuteAction(object sender, EventArgs e)
    {
    if (Status == CommandStatus.Enabled && ExecuteAction != null)
    {
    ExecuteAction(this, e); }
    }

    }

    ----------------------------------------------------------------------
    This CommandHandler fires and sets off my event. All is well at this point.
    -----------------------------------------------------------------------

    [CommandHandler(CommandNames.PodMaskingCommand_Menu)]
    public void OnPodMaskingCommand(object sender, EventArgs e)
    {
    // fire the pod masking event
    EventTopic m_EventTopic = this.WorkItem.EventTopics[EventTopicNames.PodMaskingEvent];
    m_EventTopic.Fire(this,
    new EventArgs<string>(CWDSConstants.NULL_STRING),
    null, PublicationScope.Global);
    }

    ------------------------------------------------------
    But, if the command has come via a menu click, after the m_EventTopic.Fire executes, the next line to execute is the first line of this command handler again. Then, of course, the event fires a second time.

    I've managed to track down that I am loading the commands and handlers correctly and when it goes to fire, I can't find any list that appears to have two waiting commands in it.

    This has become very frustrating and we really need to find the source of this problem pretty darn soon.

    Any help greatly appreciated.

    Rich Jones

    #2
    Sorry but you are posting to the wrong forum. Isomorphic SmartClient is not related to the Microsoft smartclient project.

    Comment

    Working...
    X