Results 1 to 2 of 2

Thread: delegate signature trouble[Resolved - my own mistake]

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    delegate signature trouble[Resolved - my own mistake]

    Hi.

    I am using .NET 2.0 C#

    I have a delegate:

    Code:
    public delegate void DoHandleUIStatus(string theMessageToDisplay, bool clearUpAfter);
    and have a method which is called upon whenever we wish to do a procedure from a another thread or whatever:

    Code:
            public void DoUpdateUIAppStatus(string theMessageToDisplay, bool clearUpAfter)
            {
                if (this.lblStatus.InvokeRequired)
                {
                    DoHandleUpdateCurrentStatus updateLabel = new DoHandleUpdateCurrentStatus(DoUpdateUIAppStatus);
                    this.Invoke(updateLabel, new object[] { theMessageToDisplay, clearUpAfter});
                }
                else
                {
                    this.lblStatus.Text = theMessageToDisplay;
                    this.tmrClearUIStatusText.Enabled = clearUpAfter;
                }
            }
    I am getting this compiler error but no idea what it means/how to make it work:


    No overload for 'DoUpdateUIAppStatus' matches delegate...

    any ideas?

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: delegate signature trouble

    edit:
    nevermind - found out the problem, my own! Calling the WRONG delegate.... duh

    its 4am

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width