25 Replies Latest reply on Nov 21, 2015 6:38 AM by msdobrescu

    PlugPlugErrorCode 51

    msdobrescu Level 1

      Hello,

       

      I try to run the SnippetRunnerPlugin sample. The UI did not show, so I have modified the sample in order to get the PlugPlugErrorCode value returned by the LoadExtension() method.

      It did. The PlugPlugErrorCode returned is 51. But PlugPlugErrorCode have not such documented value. What means 51?

       

      Here is how I have modified it:

       

      ASErr SnippetRunnerPlugin::GoMenuItem( AIMenuMessage *message )

      {

          ASErr result = kNoErr;

          PlugPlugErrorCode err = PlugPlugErrorCode::PlugPlugErrorCode_success;

       

          try {

              if (message->menuItem == this->fAboutPluginMenu)

              {

                  SDKAboutPluginsHelper aboutPluginsHelper;

                  aboutPluginsHelper.PopAboutBox(message, "About SnippetRunner", kSDKDefAboutSDKCompanyPluginsAlertString);

              }

              else if (message->menuItem == this->fShowHidePanelMenu)

              {

                  if (this->fSnippetRunnerPanelController)

                  {

                      AIBoolean visible = false;

       

                      fSnippetRunnerPanelController->IsPrimaryStageVisible(visible);

       

                      if(visible)

                      {

                         err = fSnippetRunnerPanelController->UnloadExtension();

                      }

                      else

                      {

                          err = fSnippetRunnerPanelController->LoadExtension();

                      }

       

                      if (err != PlugPlugErrorCode::PlugPlugErrorCode_success)

                      {

                          sAIUser->MessageAlert(ai::UnicodeString(std::to_string(err)));

                      }

                  }

              }

          }

          catch(ai::Error& ex) {

              result = ex;

          }

          return result;

      }