<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : [solved] FlowGraph Bug</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : [solved] FlowGraph Bug]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 09:39:04 +0000</pubDate>
  <lastBuildDate>Mon, 20 Nov 2017 20:36:09 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=23488</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[[solved] FlowGraph Bug : Hello cluster,There is really...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76295&amp;title=solved-flowgraph-bug#76295</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23488<br /><strong>Posted:</strong> 20 November 2017 at 8:36pm<br /><br /><div>Hello cluster,</div><div><br></div><div>There is really sophisticated situation with these notifications. I think it is because creating connection is complex action.</div><div>First XTP_FGN_CONNECTIONCHANGED notification is about creation temporary Connection object pDragConnection (method CXTPFlowGraphControl::StartDragConnectionPoint), which will be deleted at the end of method if end point (InputPoint) is empty.</div><div><br></div><div>To allow your algorithm works (prevent even starting of creation new connection) and to correct handling canceling in notification we need to add handling "*pResult = -1" in StartDragConnectionPoint().</div><div>One of way is checking CXTPFlowGraphConnection::m_nConnectionIndex of new connection or other member CXTPFlowGraphConnection::m_pPage with public getter GetPage().</div><div><table width="99%"><tr><td><pre class="BBcode">void CXTPFlowGraphControl::StartDragConnectionPoint(CXTPFlowGraphConnectionPoint* pPoint)</div><div>{</div><div>....</div><div>&nbsp; &nbsp; CXTPFlowGraphConnection* pDragConnection = new CXTPFlowGraphConnection();</div><div>&nbsp; &nbsp; pDragConnection-&gt;SetOutputPoint(pOutputPoint);</div><div><br></div><div>&nbsp; &nbsp; m_pActivePage-&gt;GetConnections()-&gt;AddConnection(pDragConnection);</div><div><br></div><div><b><font color="#00cc00">&nbsp; &nbsp; //adding connection was canceled through notification</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; if (pDragConnection-&gt;m_nConnectionIndex == -1 || pDragConnection-&gt;GetPage() == NULL)</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; {</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; pDragConnection-&gt;OnRemoved();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; pDragConnection-&gt;InternalRelease();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; return;</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; }</font></b></div><div>....</div><div></pre></td></tr></table></div><div>Such conditions should be added in CXTPFlowGraphUndoDeleteConnectionCommand::Undo <table width="99%"><tr><td><pre class="BBcode">void CXTPFlowGraphUndoDeleteConnectionCommand::Undo()</div><div>{</div><div>......</div><div>&nbsp; &nbsp; &nbsp; &nbsp; m_pPage-&gt;GetConnections()-&gt;AddConnection(m_pConnection);</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; //adding connection was canceled through notification</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; if (m_pConnection-&gt;GetPage() == NULL)</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; {</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pConnection-&gt;OnRemoved();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m_pConnection-&gt;InternalRelease();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; }</font></b></div><div>&nbsp; &nbsp; }</div><div>}</pre></td></tr></table></div><div><br></div><div>The reason of assertions in CXTPFlowGraphConnectionPoint::OnRemoved() is because you don't allow addition new connection in AddConnection() but then you call&nbsp;</div><div>SetInputPoint() or SetOutputPoint()</div><div><table width="99%"><tr><td><pre class="BBcode">&nbsp; &nbsp; CXTPFlowGraphConnection* pConnection;</div><div>&nbsp; &nbsp; pConnection = pPage-&gt;GetConnections()-&gt;<b>AddConnection</b>(new CXTPFlowGraphConnection());</div><div>&nbsp; &nbsp; pConnection-&gt;<b>SetOutputPoint</b>(pTableOrders-&gt;GetConnectionPoints()-&gt;FindConnectionPoint(_T("Customer ID")));</div><div>&nbsp; &nbsp; pConnection-&gt;<b>SetInputPoint</b>(pTableCustomers-&gt;GetConnectionPoints()-&gt;FindConnectionPoint(_T("ID")));</div><div></pre></td></tr></table></div><div>in such code should be added checking results of AddConnection()</div><div><table width="99%"><tr><td><pre class="BBcode">&nbsp; &nbsp; CXTPFlowGraphConnection* pConnection;</div><div>&nbsp; &nbsp; pConnection = pPage-&gt;GetConnections()-&gt;<b>AddConnection</b>(new CXTPFlowGraphConnection());</div><div><b><font color="#00cc00">&nbsp; &nbsp; if (pConnection-&gt;GetPage() == NULL)&nbsp; &nbsp; //adding connection was canceled through notification</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; {</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; //pConnection-&gt;OnRemoved();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; pConnection-&gt;InternalRelease();</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; &nbsp; &nbsp; pConnection = NULL;</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; }</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; else</font></b></div><div><b><font color="#00cc00">&nbsp; &nbsp; {</font></b></div><div>&nbsp; &nbsp; &nbsp; &nbsp; pConnection-&gt;<b>SetOutputPoint</b>(pTableOrders-&gt;GetConnectionPoints()-&gt;FindConnectionPoint(_T("Customer ID")));</div><div>&nbsp; &nbsp; &nbsp; &nbsp; pConnection-&gt;<b>SetInputPoint</b>(pTableCustomers-&gt;GetConnectionPoints()-&gt;FindConnectionPoint(_T("ID")));</div><div>&nbsp; &nbsp; }</div><div></pre></td></tr></table></div><div><br></div><div>Regards,</div><div>&nbsp;Oleksandr Lebed</div>]]>
   </description>
   <pubDate>Mon, 20 Nov 2017 20:36:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76295&amp;title=solved-flowgraph-bug#76295</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] FlowGraph Bug : Hello Oleksandr,thank for your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76289&amp;title=solved-flowgraph-bug#76289</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8817">cluster</a><br /><strong>Subject:</strong> 23488<br /><strong>Posted:</strong> 17 November 2017 at 6:44am<br /><br />Hello Oleksandr,<br><br>thank for your reply.<br>The order of the messages is:<br>1. StartDragConnectionPoint (DragEnter) -&gt; Create a Connection -&gt; Send the XTP_FGN_CONNECTIONCHANG<b>ED </b>message<b><br></b>2.<b> </b>WM_MOUSEMOVE (DragOver)<b> </b>-&gt; Send the XTP_FGN_CONNECTIONCHANG<b><b>ING</b></b> message<b><b><br></b></b>3. (Drop) <b>-</b>&gt; there is no message anymore!<b><b><br><br></b></b>And I want to block the starting process, of course I could deviate from the control class, but I thought therefor there are these messages.<b><b><br></b></b>]]>
   </description>
   <pubDate>Fri, 17 Nov 2017 06:44:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76289&amp;title=solved-flowgraph-bug#76289</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] FlowGraph Bug : Hello cluster,For preventing adding...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76285&amp;title=solved-flowgraph-bug#76285</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 23488<br /><strong>Posted:</strong> 16 November 2017 at 4:18pm<br /><br />Hello cluster,<br><br>For preventing adding connection you should handle XTP_FGN_CONNECTIONCHANG<b>ING</b> NotifyMessage which used during changing.<br>XTP_FGN_CONNECTIONCHANG<b>ED</b> used after changes.<br><br>Regards,<br>&nbsp;Oleksandr Lebed]]>
   </description>
   <pubDate>Thu, 16 Nov 2017 16:18:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76285&amp;title=solved-flowgraph-bug#76285</guid>
  </item> 
  <item>
   <title><![CDATA[[solved] FlowGraph Bug : Hello,I figured out that CXTPFlowGraphConnection...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76280&amp;title=solved-flowgraph-bug#76280</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8817">cluster</a><br /><strong>Subject:</strong> 23488<br /><strong>Posted:</strong> 15 November 2017 at 6:42am<br /><br />Hello,<br><br>I figured out that CXTPFlowGraphConnection objects will not deleted if I block the "add" process.<br>So, if I return a <b>*pResult = -1</b> in a XTP_FGN_CONNECTIONCHANGED NotifyMessage the connection will not deleted. <br>I triggered a ASSERT message in CXTPFlowGraphConnectionPoint::OnRemoved()<br><br>&nbsp;&nbsp;&nbsp; // Removed Connections should update them<br>&nbsp;&nbsp;&nbsp; ASSERT(m_arrInputConnections.GetSize() == 0);<br>&nbsp;&nbsp;&nbsp; ASSERT(m_arrOutputConnections.GetSize() == 0);<br><br><br><br>Windows 7, Visual Studio 2010, Toolkit Pro 17.3.0    ]]>
   </description>
   <pubDate>Wed, 15 Nov 2017 06:42:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23488&amp;PID=76280&amp;title=solved-flowgraph-bug#76280</guid>
  </item> 
 </channel>
</rss>