<?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 Re: Handle events from browser control DG::Browser in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291758#M2711</link>
    <description>&lt;BLOCKQUOTE&gt;Martin wrote:&lt;BR /&gt;I'm not able to make it. My code does not compile in this line:
&lt;PRE&gt;DGEventNotifier&amp;lt;BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable func = &amp;amp;UIBrowser::URLChanged;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;

Try changing this to:&lt;PRE&gt;this-&amp;gt;urlChanged += DGEventNotifier&amp;lt;DG::BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable(UIBrowser::URLChanged);&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Feb 2020 15:22:31 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2020-02-07T15:22:31Z</dc:date>
    <item>
      <title>Handle events from browser control DG::Browser</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291755#M2708</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;How can I recognize an event from the browser control DG::Browser, for example the URLChanged which is declared in BrowserBase?&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Sep 2022 07:35:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291755#M2708</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2022-09-29T07:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Handle events from browser control DG::Browser</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291756#M2709</link>
      <description>Use the += operator of &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;BrowserBase::urlChanged&lt;E&gt;&lt;/E&gt; to add a &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;Runnable&lt;E&gt;&lt;/E&gt; callback function to respond to this event.</description>
      <pubDate>Wed, 05 Feb 2020 13:55:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291756#M2709</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-05T13:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Handle events from browser control DG::Browser</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291757#M2710</link>
      <description>Sorry I'm not able to make it. My code does not compile in this line:
&lt;PRE&gt;DGEventNotifier&amp;lt;BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable func = &amp;amp;UIBrowser::URLChanged;&lt;/PRE&gt;

Can you please tell me what is wrong?&lt;BR /&gt;
&lt;BR /&gt;
My whole code is:
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;class UIBrowser: public DG::Browser
{
public:
	UIBrowser(const DG::Panel&amp;amp; panel, short item);

private:
	virtual void URLChanged(const DG::BrowserURLChangedArg&amp;amp; eventArg) override;
};

UIBrowser::UIBrowser(const DG::Panel&amp;amp; panel, short item) :
	DG::Browser(panel, item)
{
	DGEventNotifier&amp;lt;BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable func = &amp;amp;UIBrowser::URLChanged;
	this-&amp;gt;urlChanged += func;
}

void UIBrowser::URLChanged(const DG::BrowserURLChangedArg&amp;amp; eventArg)
{
...
}
&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2020 14:52:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291757#M2710</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-02-07T14:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Handle events from browser control DG::Browser</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291758#M2711</link>
      <description>&lt;BLOCKQUOTE&gt;Martin wrote:&lt;BR /&gt;I'm not able to make it. My code does not compile in this line:
&lt;PRE&gt;DGEventNotifier&amp;lt;BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable func = &amp;amp;UIBrowser::URLChanged;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;

Try changing this to:&lt;PRE&gt;this-&amp;gt;urlChanged += DGEventNotifier&amp;lt;DG::BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable(UIBrowser::URLChanged);&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2020 15:22:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291758#M2711</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-07T15:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Handle events from browser control DG::Browser</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291759#M2712</link>
      <description>that doesn't compile too.&lt;BR /&gt;
and neither:&lt;BR /&gt;

&lt;PRE&gt;this-&amp;gt;urlChanged += DGEventNotifier&amp;lt;DG::BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable(&amp;amp;UIBrowser::URLChanged);&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2020 15:32:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291759#M2712</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-02-07T15:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Handle events from browser control DG::Browser</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291760#M2713</link>
      <description>The urlChanged function should look more like this:&lt;PRE&gt;void UIBrowser::URLChanged(const DG::BrowserBase&amp;amp; source, const DG::BrowserURLChangedArg&amp;amp; eventArg)
&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2020 15:48:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291760#M2713</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2020-02-07T15:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Handle events from browser control DG::Browser</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291761#M2714</link>
      <description>Obviously the callback function can not be defined in a class. I got it working finally this way:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;void handleURLChanged(const DG::BrowserBase&amp;amp; source, const DG::BrowserURLChangedArg&amp;amp; eventArg);

m_browser.urlChanged += DGEventNotifier&amp;lt;DG::BrowserBase, DG::BrowserURLChangedArg&amp;gt;::Runnable(&amp;amp;handleURLChanged);
&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Feb 2020 17:05:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Handle-events-from-browser-control-DG-Browser/m-p/291761#M2714</guid>
      <dc:creator>Martin Walter</dc:creator>
      <dc:date>2020-02-07T17:05:38Z</dc:date>
    </item>
  </channel>
</rss>

