diff --git a/SpeckleConnector/Connector/Connector.cpp b/SpeckleConnector/Connector/Connector.cpp index 4306b0b..c4369dd 100755 --- a/SpeckleConnector/Connector/Connector.cpp +++ b/SpeckleConnector/Connector/Connector.cpp @@ -29,6 +29,7 @@ namespace { ConnectorInstance(const String& name) : ConnectorAddon{name} { add(); add(); + //The connector 'owns' the model card database, so the publisher list should only hold a weak reference addWeak(m_modelCards.getSubscription()); } diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.cpp b/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.cpp index 33e1982..f6036cb 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.cpp +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.cpp @@ -53,13 +53,13 @@ BrowserBridge::~BrowserBridge() { /*-------------------------------------------------------------------- Get the names of the methods supported by this bridge - + return: The supported method names --------------------------------------------------------------------*/ -ValueSetting BrowserBridge::getMethodNames() const { - ValueSetting result; +std::vector BrowserBridge::getMethodNames() const { + std::vector result; for (const auto& method : *m_methods) - result.emplace_back(StringValue{method->getName()}); + result.emplace_back(method->getName()); return result; } //BrowserBridge::getMethodNames diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.h b/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.h index 2b24c49..022a44d 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.h +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/BrowserBridge.h @@ -27,7 +27,7 @@ namespace speckle::interfac::browser::bridge { Constructor @param name The JS object name */ - BrowserBridge(const speckle::utility::String& name); + BrowserBridge(const utility::String& name); /*! Destructor */ @@ -39,7 +39,7 @@ namespace speckle::interfac::browser::bridge { Get the names of the methods supported by this bridge @return The supported method names */ - active::setting::ValueSetting getMethodNames() const; + std::vector getMethodNames() const; /*! Get a browser method by name @return A pointer to the requested method (owner does not take ownership, nullptr = failure) diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.cpp b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.cpp index 81d42e1..e92bf61 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.cpp +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.cpp @@ -6,21 +6,21 @@ using namespace active::serialise; using namespace speckle::serialise::jsbase; using namespace speckle::interfac::browser; using namespace speckle::interfac::browser::bridge; +using namespace speckle::utility; /*-------------------------------------------------------------------- Constructor - + bridge: The parent bridge object (provides access to bridge methods) --------------------------------------------------------------------*/ GetBindingsMethodNames::GetBindingsMethodNames() : JSFunction{"GetBindingsMethodNames", [&]() { return getMethodNames(); - }} { -} //GetBindingsMethodNames::GetBindingsMethodNames +}} {} //GetBindingsMethodNames::GetBindingsMethodNames /*-------------------------------------------------------------------- Get the names of the methods supported by the parent browser - + return: The supported method names --------------------------------------------------------------------*/ std::unique_ptr GetBindingsMethodNames::getMethodNames() const { diff --git a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h index 4d26239..affcbeb 100644 --- a/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h +++ b/SpeckleLib/Speckle/Interface/Browser/Bridge/Functions/GetBindingsMethodNames.h @@ -2,17 +2,16 @@ #define SPECKLE_INTERFACE_BRIDGE_GET_METHOD_NAMES #include "Active/Serialise/CargoHold.h" +#include "Active/Serialise/Package/Wrapper/ContainerWrap.h" #include "Active/Serialise/Package/Wrapper/ValueSettingWrap.h" #include "Speckle/Interface/Browser/PlatformBinding.h" #include "Speckle/Interface/Browser/JSFunction.h" #include "Speckle/Interface/Browser/Bridge/BridgeChild.h" namespace speckle::interfac::browser::bridge { - - class BrowserBridge; - - using WrappedValue = active::serialise::CargoHold; - + + using WrappedValue = active::serialise::CargoHold>, std::vector>; + /*! JS Function class to retrieve the names of the methods supported by the bridge */ @@ -20,12 +19,12 @@ namespace speckle::interfac::browser::bridge { public: // MARK: - Constructors - + /*! Default constructor */ GetBindingsMethodNames(); - + private: /*! Get the names of the methods supported by the parent browser