• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can't get SCS_GetNewFeatures to work in SourceControl Extension (DW CS4)

Guest
Jul 23, 2009 Jul 23, 2009

Copy link to clipboard

Copied

I am writing a source control extension, and can't get the SCS_GetNewFeatures to work.  SCS_GetNewFeatures gets called, but the call backs I register don't.  I can't find my menu anywhere.

Any help would be appreciated.  Here is my SCS_GetNewFeatures implementation, and call back functions:

bool SCS_GetNewFeatures(char menuItemList [][32], scFunction functionList [], scFunction enablerList [], const int numNewFeatures)
{
    bool rtVal = true;
    for (int i = 0; i < numNewFeatures; i++)
    {
        if (i == 0)
        {
            strncpy(menuItemList,"Testing", 32);
            functionList = (scFunction)TestingFunc;
            enablerList = (scFunction)EnableTestingFunc;
        }
    }

    return rtVal;
}

bool TestingFunc(void *connectionData, const char *remotePathList[],
    const char *localPathList[], const int numItems)
{
    MessageBox(NULL, L"Testing",L"Testing", IDOK);
    return true;
}

bool EnableTestingFunc(void *connectionData, const char *remotePathList[],
    const char *localPathList[], const int numItems)
{
    return true;
}

TOPICS
Extensions

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 24, 2009 Jul 24, 2009

Copy link to clipboard

Copied

You are not passing anything to your function call, and all I can see in your code are the example function arguments as shown on page 96 of the DW api reference (pdf version)!

This type of example tells me absolutly nothing about what you are trying to do.

PZ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 27, 2009 Jul 27, 2009

Copy link to clipboard

Copied

I'm not sure I understand your response.  My understanding of the way to add additional functionality to the Source Control interface, is to implement  SCS_GetNewFeatures, where the implementation registers enabler and action functions, along with a menu.  My code is doing this.  SCS_GetNewFeatures is getting called, but I don't see the new menu (Testing) anywhere (I may not be looking in the correct spot, although I have looked in most of the menus), and the menu enabler function (EnableTestingFunc) isn't getting called (I have put a break point in the function).

I don't understand what you mean by not passing anything to my function call - I'm not who calls TestingFunc and EnableTestingFunc - DW does, passing the necessary parameters.  I just need to make sure that my functions match the function template for scFunction (defined on the mentioned page of the api reference).

I'm looking for help in figuring out why my registered callbacks (TestingFunc and EnableTestingFunc) aren't getting called, and why my menu (Testing) isn't showing anywhere.  I figure I am missing something basic, or doing something obiously wrong.

This is simply testing code to get the basic functionality working.  Once I get that far, I will put in real code to do what really needs to be done.  It should show a menu (always enabled), that when clicked, shows an dialog box (at this point using a Windows API call)

If you have a working sample of this kind of code, I would love to see it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 27, 2009 Jul 27, 2009

Copy link to clipboard

Copied

LATEST

I finally go this to work.  I had missed the part on the main source control integration page that says to add a menu (via menu.xml) for custom menu items to land in.  It would have been nice if the documentation for SCS_GetNewFeatures referenced the same note...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines