<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Archicad 24 Browser Control Url Changed Handler Issue in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-24-Browser-Control-Url-Changed-Handler-Issue/m-p/248798#M2557</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hello Everyone&lt;BR /&gt;&lt;BR /&gt;I am currently checking out the examples of the SDK 24. I was trying to implement a simple &lt;STRONG&gt;urlChanged handler&lt;/STRONG&gt; on the DG::Browser in the BrowserPalette Class. I was working with handlers before in C# but not in C++. When i try to build it I always get an error message.&lt;BR /&gt;&lt;BR /&gt;The goal is it to check the url and if necessary change the url of the browser&lt;BR /&gt;&lt;BR /&gt;Here is the BrowserPalette.hpp Class with my handler function:&lt;BR /&gt;public:&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;protected:&lt;BR /&gt;&lt;STRONG&gt;virtual void handleURLChanged(const DG::BrowserBase&amp;amp;, DG::BrowserURLChangeArg&amp;amp;);&lt;/STRONG&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;BrowserPalette.cpp:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;void BrowserPalette::handleURLChanged(const DG::BrowserBase&amp;amp;, DG::BrowserURLChangeArg&amp;amp;)&lt;/STRONG&gt;&lt;BR /&gt;{&lt;BR /&gt;//change Url &lt;BR /&gt;browser.LoadURL("&lt;A href="http://www.abc.com" target="_blank" rel="noopener"&gt;www.abc.com&lt;/A&gt;");&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void BrowserPalette::InitBrowserControl ()&lt;BR /&gt;{&lt;BR /&gt;browser.LoadURL (siteURL);&lt;BR /&gt;RegisterACAPIJavaScriptObject ();&lt;BR /&gt;UpdateSelectedElementsOnHTML ();&lt;BR /&gt;&lt;STRONG&gt;browser.onUrlChanged += BrowserPalette::handleURLChanged;&lt;/STRONG&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;EventNotifier.hpp&lt;BR /&gt;EventNotifier&amp;amp; operator+= (bool (Object::*function)(const Source&amp;amp;, EventArg&amp;amp;));&lt;BR /&gt;&lt;BR /&gt;EventNotifier&amp;amp; operator+= (bool (*function)(const Source&amp;amp;, EventArg&amp;amp;));&lt;BR /&gt;&lt;BR /&gt;template&amp;lt;typename Lambda&amp;gt;&lt;BR /&gt;EventNotifier&amp;amp; operator+= (const Lambda&amp;amp; runnable);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error message while building:&lt;BR /&gt;&lt;STRONG&gt;Error C2679 Binary operator "+=": No operator could be found that accepts a right-hand operand of type "overloaded-function" (or no suitable conversion possible)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I tried a lot of different approaches but was not able to make it run therefore I wanted to reach out to the community and ask if someone could help out here.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot, stay healthy and greetings from Switzerland,&lt;BR /&gt;&lt;BR /&gt;Ruka&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Sep 2021 07:56:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-14T07:56:31Z</dc:date>
    <item>
      <title>Archicad 24 Browser Control Url Changed Handler Issue</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-24-Browser-Control-Url-Changed-Handler-Issue/m-p/248798#M2557</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello Everyone&lt;BR /&gt;&lt;BR /&gt;I am currently checking out the examples of the SDK 24. I was trying to implement a simple &lt;STRONG&gt;urlChanged handler&lt;/STRONG&gt; on the DG::Browser in the BrowserPalette Class. I was working with handlers before in C# but not in C++. When i try to build it I always get an error message.&lt;BR /&gt;&lt;BR /&gt;The goal is it to check the url and if necessary change the url of the browser&lt;BR /&gt;&lt;BR /&gt;Here is the BrowserPalette.hpp Class with my handler function:&lt;BR /&gt;public:&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;protected:&lt;BR /&gt;&lt;STRONG&gt;virtual void handleURLChanged(const DG::BrowserBase&amp;amp;, DG::BrowserURLChangeArg&amp;amp;);&lt;/STRONG&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;BrowserPalette.cpp:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;void BrowserPalette::handleURLChanged(const DG::BrowserBase&amp;amp;, DG::BrowserURLChangeArg&amp;amp;)&lt;/STRONG&gt;&lt;BR /&gt;{&lt;BR /&gt;//change Url &lt;BR /&gt;browser.LoadURL("&lt;A href="http://www.abc.com" target="_blank" rel="noopener"&gt;www.abc.com&lt;/A&gt;");&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void BrowserPalette::InitBrowserControl ()&lt;BR /&gt;{&lt;BR /&gt;browser.LoadURL (siteURL);&lt;BR /&gt;RegisterACAPIJavaScriptObject ();&lt;BR /&gt;UpdateSelectedElementsOnHTML ();&lt;BR /&gt;&lt;STRONG&gt;browser.onUrlChanged += BrowserPalette::handleURLChanged;&lt;/STRONG&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;EventNotifier.hpp&lt;BR /&gt;EventNotifier&amp;amp; operator+= (bool (Object::*function)(const Source&amp;amp;, EventArg&amp;amp;));&lt;BR /&gt;&lt;BR /&gt;EventNotifier&amp;amp; operator+= (bool (*function)(const Source&amp;amp;, EventArg&amp;amp;));&lt;BR /&gt;&lt;BR /&gt;template&amp;lt;typename Lambda&amp;gt;&lt;BR /&gt;EventNotifier&amp;amp; operator+= (const Lambda&amp;amp; runnable);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error message while building:&lt;BR /&gt;&lt;STRONG&gt;Error C2679 Binary operator "+=": No operator could be found that accepts a right-hand operand of type "overloaded-function" (or no suitable conversion possible)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I tried a lot of different approaches but was not able to make it run therefore I wanted to reach out to the community and ask if someone could help out here.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot, stay healthy and greetings from Switzerland,&lt;BR /&gt;&lt;BR /&gt;Ruka&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:56:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Archicad-24-Browser-Control-Url-Changed-Handler-Issue/m-p/248798#M2557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-14T07:56:31Z</dc:date>
    </item>
  </channel>
</rss>

