<?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: ITrackCancel.CancelOnClick in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/itrackcancel-cancelonclick/m-p/185984#M4836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi, &lt;BR /&gt;Here's what I am trying to do:&lt;BR /&gt;&lt;BR /&gt;ITrackCancel myTrackCancel = new TrackCancelClass();&lt;BR /&gt;myTrackCancel.Reset();&amp;nbsp; //no problem here&lt;BR /&gt;myTrackCancel.CancelOnClick = false; // I get a System.NotImplementedException here&lt;BR /&gt;&lt;BR /&gt;The exception message is "The method or operation is not implemented".&lt;BR /&gt;&lt;BR /&gt;Has anybody experienced this before? Do I need to do anything to the myTrackCancel beforehand so I can set those bool values?&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Sukhjit&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just try not to reset the TrackCancel object before setting its CancelOnClick property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000235000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000235000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ITrackCancel.Reset:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Resets the manager after the associated operation is finished."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;"The Reset method should be called just before a process that may be cancelled, such as a lengthy operation, begins. The Reset method sets the state of the CancelTracker to uncancelled and returns the internal counter, which is used to update the Progressor to zero."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See this example code where it doesn't implement the 'Reset' method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000001w000000.htm"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000001w000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if it doesn't help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2011 17:42:53 GMT</pubDate>
    <dc:creator>SandhyaYamarthi</dc:creator>
    <dc:date>2011-06-17T17:42:53Z</dc:date>
    <item>
      <title>ITrackCancel.CancelOnClick</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itrackcancel-cancelonclick/m-p/185983#M4835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's what I am trying to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ITrackCancel myTrackCancel = new TrackCancelClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myTrackCancel.Reset();&amp;nbsp; //no problem here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myTrackCancel.CancelOnClick = false; // I get a System.NotImplementedException here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The exception message is "The method or operation is not implemented".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anybody experienced this before? Do I need to do anything to the myTrackCancel beforehand so I can set those bool values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sukhjit&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 16:06:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itrackcancel-cancelonclick/m-p/185983#M4835</guid>
      <dc:creator>SukhjitPal</dc:creator>
      <dc:date>2011-06-16T16:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: ITrackCancel.CancelOnClick</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itrackcancel-cancelonclick/m-p/185984#M4836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi, &lt;BR /&gt;Here's what I am trying to do:&lt;BR /&gt;&lt;BR /&gt;ITrackCancel myTrackCancel = new TrackCancelClass();&lt;BR /&gt;myTrackCancel.Reset();&amp;nbsp; //no problem here&lt;BR /&gt;myTrackCancel.CancelOnClick = false; // I get a System.NotImplementedException here&lt;BR /&gt;&lt;BR /&gt;The exception message is "The method or operation is not implemented".&lt;BR /&gt;&lt;BR /&gt;Has anybody experienced this before? Do I need to do anything to the myTrackCancel beforehand so I can set those bool values?&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Sukhjit&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just try not to reset the TrackCancel object before setting its CancelOnClick property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000235000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000235000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ITrackCancel.Reset:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Resets the manager after the associated operation is finished."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;"The Reset method should be called just before a process that may be cancelled, such as a lengthy operation, begins. The Reset method sets the state of the CancelTracker to uncancelled and returns the internal counter, which is used to update the Progressor to zero."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See this example code where it doesn't implement the 'Reset' method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000001w000000.htm"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000001w000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if it doesn't help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 17:42:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itrackcancel-cancelonclick/m-p/185984#M4836</guid>
      <dc:creator>SandhyaYamarthi</dc:creator>
      <dc:date>2011-06-17T17:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: ITrackCancel.CancelOnClick</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itrackcancel-cancelonclick/m-p/185985#M4837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Sandhya!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your reply. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I figured out the solution shortly after my post &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I came back to post the solution in case somebody else was struggling with the same issue and realized that you've replied to me already.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's what I did to solve my issue:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ITrackCancel myCancelTracker = new CancelTrackerClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myCancelTracker.CancelOnClick = true; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myCancelTracker.CancelOnKeyPress = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both TrackCancelClass and CancelTrackerClass implement ITrackCancel but TrackCancelClass can only be used in Server Context. I needed to use CancelTrackerClass since I wanted to interrupt redrawing features on the map on click or on any key press. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's so confusing since these two classes are named in such a similar way. I just wish esri people would've named them a little nicer so that I could tell a difference by just looking at the name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Just try not to reset the TrackCancel object before setting its CancelOnClick property.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000235000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004200000235000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;ITrackCancel.Reset:&lt;BR /&gt;"Resets the manager after the associated operation is finished."&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;"The Reset method should be called just before a process that may be cancelled, such as a lengthy operation, begins. The Reset method sets the state of the CancelTracker to uncancelled and returns the internal counter, which is used to update the Progressor to zero."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;See this example code where it doesn't implement the 'Reset' method:&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000001w000000.htm"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000001w000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Let me know if it doesn't help.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 13:47:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itrackcancel-cancelonclick/m-p/185985#M4837</guid>
      <dc:creator>SukhjitPal</dc:creator>
      <dc:date>2011-06-20T13:47:22Z</dc:date>
    </item>
  </channel>
</rss>

