<?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="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : TabViewController - View Communication</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : TabViewController - View Communication</description>
  <pubDate>Thu, 11 Jun 2026 13:39:11 -700</pubDate>
  <lastBuildDate>Tue, 13 Nov 2007 11:35:41 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=520</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>TabViewController - View Communication : The base class AppViewPresenter...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1918#1918</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 13-Nov-2007 at 11:35am<br /><br />The base class AppViewPresenter contains the virtual method OnViewContextSet() that you can override in your child presenter.&nbsp; <DIV>&nbsp;</DIV><DIV>The ViewContext property is not valid until this method has been called.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Tue, 13 Nov 2007 11:35:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1918#1918</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication :  Originally posted by Bill Jensen As...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1911#1911</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 12-Nov-2007 at 4:43pm<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Bill Jensen</strong></em><br /><br /><DIV>As we'ver discussed in other threads,&nbsp;the mechanism for communicating between a presenter and its view controller is the view context.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>The steps are:</DIV><DIV>&nbsp;</DIV><DIV>1. The controller creates the view context and adds it to the workitem under a unique view id.</DIV><DIV>&nbsp;</DIV><DIV>2.&nbsp; The controller then creates the view, possibly using the ViewFactoryService, and adds it to the workitem under the same unique view id.</DIV><DIV>&nbsp; </DIV><DIV>3.&nbsp; The&nbsp;object builder&nbsp;injects the presenter into the view&nbsp;(causing its creation by the object builder).</DIV><DIV>&nbsp;</DIV><DIV>4.&nbsp; The view&nbsp;informs the presenter itself and its unique view id.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>5.&nbsp; The presenter uses the unique view Id to retrieve the context for this particular view instance.</DIV><DIV></td></tr></table> </DIV><DIV>&nbsp;</DIV><DIV>Why would the ViewContext still&nbsp;be null after the view is created and the presenter is injected?&nbsp; Shouldn't I be able to refer to the ViewContext from the presenter like this:</DIV><DIV><FONT color=#2b91af size=2></FONT>&nbsp;</DIV><DIV><FONT color=#2b91af size=2>IBindingViewContext</FONT><FONT size=2> mViewContext = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.ViewContext;</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Sorry...thought this one was solved.&nbsp; I am&nbsp;finally getting back to it.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Bill</DIV></FONT>]]>
   </description>
   <pubDate>Mon, 12 Nov 2007 16:43:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1911#1911</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : Page and TabViewControllers have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1831#1831</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 29-Oct-2007 at 2:19pm<br /><br /><P>Page and TabViewControllers have a CreateView() (or CreateViews() or CreateSummaryView() or something like that) method.&nbsp;&nbsp;&nbsp; Just create the view context and add it to the work item before creating the view.&nbsp; There's a static method on ViewContextBase to do it.</P><DIV>&nbsp;</DIV><DIV>B</DIV>]]>
   </description>
   <pubDate>Mon, 29 Oct 2007 14:19:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1831#1831</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : Should each view have its own...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1830#1830</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 29-Oct-2007 at 2:05pm<br /><br /><DIV><FONT color=#0000cc>Should each view have its own interface?&nbsp; </FONT></DIV><DIV>&nbsp;</DIV><DIV>It could if it needed to receive unique&nbsp;information from the presenter.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000cc>If so, of what is the interface comprised?</FONT></DIV><DIV>&nbsp;</DIV><DIV>The minimum set of members to allow the view to do its job.&nbsp; i.e., to receive the information it needs from the presenter.</DIV><DIV>&nbsp;</DIV><DIV>That said, we recommend against custom view interfaces.&nbsp; Instead, stick with the (relatively general) IBindingView or IAppView.&nbsp; If the presenter needs to call into the view, define a delegate type (signature of a method) in the presenter together with a Register() method.&nbsp;&nbsp; As soon as the presenter is set (injected) into the view, call Register(), passing a delegate to a method in the view.&nbsp; When the presenter needs to call into the view, it invokes the delegate, if it's been set.&nbsp; If not, it does nothing.</DIV><DIV>&nbsp;</DIV><DIV>This way, the presenter depends only on the delegate type (that IT defines).&nbsp; The view may or may not register to receive that information as its needs dictate.&nbsp; Because it depends only on the general view interface (like IBindingView or IAppView), the presenter type&nbsp;might be usable by multiple view types, some registering a callback, some not.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000cc>Where is the most logical place to create the MyViewContext class?&nbsp; Views folder of the module?</FONT></DIV><DIV>&nbsp;</DIV><DIV>Sounds fine to me.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000cc>Create and add to WorkItem?</FONT></DIV><DIV><FONT color=#0000cc></FONT>&nbsp;</DIV><DIV><FONT color=#000000>In the page controller, just before creating the view.</FONT></DIV><DIV>&nbsp;</DIV><DIV>B.</DIV>]]>
   </description>
   <pubDate>Mon, 29 Oct 2007 14:05:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1830#1830</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : Sorry...another question...  You...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1829#1829</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 29-Oct-2007 at 2:05pm<br /><br />Sorry...another question...<DIV>&nbsp;</DIV><DIV>You mentioned that the controller creates the view context and adds it to the work item--where is that happening?&nbsp; I cannot find that (unless you are talking about creating my own viewcontext).</DIV>]]>
   </description>
   <pubDate>Mon, 29 Oct 2007 14:05:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1829#1829</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : Should each view have its own...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1828#1828</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 29-Oct-2007 at 1:25pm<br /><br /><DIV>Should each view have its own interface?&nbsp; If so, of what is the interface comprised?</DIV><DIV>&nbsp;</DIV><DIV>Where is the most logical place to create the MyViewContext class?&nbsp; Views folder of the module?</DIV><DIV>&nbsp;</DIV><DIV>Create and add to WorkItem?</DIV>]]>
   </description>
   <pubDate>Mon, 29 Oct 2007 13:25:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1828#1828</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication :      So, Chris Holmes suggests...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1826#1826</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 29-Oct-2007 at 12:29pm<br /><br /><DIV><DIV></DIV><DIV><DIV><DIV></DIV><DIV></DIV><FONT color=#0000cc>So, Chris Holmes suggests that one should avoid making controls public, but he doesn't say why.&nbsp; Can anyone shed some light on this?</FONT></DIV></DIV></DIV><P>Loose coupling between components.</P><DIV>If a view exposes its controls publicly, then the classes that reference it are permanently bound to the view's type and to the specific control types.&nbsp; If you later decide to replace a text box with a combo box, all the referencing classes need to change.</DIV><DIV>&nbsp;</DIV><DIV>A view's only responsibility is to pass information to and from the user.&nbsp; The presenter and the rest of the app shouldn't care how it does it.&nbsp; That's why the presenter only interacts with the view through its interface.</DIV><DIV>&nbsp;</DIV><DIV>Normally, the view exchanges information with the rest of the app via the Model--typically supplied by the presenter by setting a data source into the view's BindingSource.&nbsp; Other information may be transmitted&nbsp; via the ViewContext, typically via the presenter.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000cc size=2>I have no idea what you mean by supplying a delegate in the ViewContext.&nbsp; I do not see a mechanism for me to do that.</FONT></DIV><DIV><FONT color=#0000cc size=2></FONT>&nbsp;</DIV><DIV><FONT color=#000000 size=2>Like this:</FONT></DIV><DIV><FONT size=2><P></FONT><FONT color=#008000 size=2>// Custom view context for MyView</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>MyViewContext</FONT><FONT size=2> : </FONT><FONT color=#008080 size=2>ViewContextBase</P></FONT><FONT size=2><P>{</P><P></FONT><FONT color=#008000 size=2>&nbsp;&nbsp;&nbsp; // Delegate declaration</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>delegate</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>MyCallbackType</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> myData);</P><P></FONT><FONT color=#008000 size=2>&nbsp;&nbsp;&nbsp; // Delegate member - holds a reference to a function with delegate's signature</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; private</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>MyCallbackType</FONT><FONT size=2> mCallback;</P><P></FONT><FONT color=#008000 size=2>&nbsp;&nbsp;&nbsp; // Make delegate accessible as a property</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; public</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>MyCallbackType</FONT><FONT size=2> Callback</P><P>&nbsp;&nbsp;&nbsp; {</P><P></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; get</FONT><FONT size=2> { </FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> mCallback; }</P><P></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; set</FONT><FONT size=2> { mCallback = </FONT><FONT color=#0000ff size=2>value</FONT><FONT size=2>; }</P><P>&nbsp;&nbsp;&nbsp; }</P><P>}</P><P></FONT><FONT color=#008000 size=2>// In the page controller:</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>protected</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>override</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> CreateViews()</P><P>{</P><P></FONT><FONT color=#008080 size=2>&nbsp;&nbsp;&nbsp; MyViewContext</FONT><FONT size=2> context = ...; </FONT><FONT color=#008000 size=2>// Create and add to workitem</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>&nbsp;&nbsp;&nbsp; // Pass a reference to the callback function in the context</P></FONT><FONT size=2><P>&nbsp;&nbsp;&nbsp; context.Callback = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>MyViewContext</FONT><FONT size=2>.</FONT><FONT color=#008080 size=2>MyCallbackType</FONT><FONT size=2>(callback);</P><P>}</P><P></FONT><FONT color=#008000 size=2>// Called by presenter via delegate&nbsp;when new data available.&nbsp; Must have delegate's signature</P><DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> Callback(</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> data)</DIV><P>{</P><P>}</P><P></FONT><FONT color=#008000 size=2>// In MyViewPresenter:</P></FONT><FONT color=#0000ff size=2><P><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>MyViewContext</FONT><FONT size=2> mContext;</P></FONT><P><FONT color=#008000 size=2>// Called by view when value of data control changes</P><P></FONT>public</FONT><FONT size=2> voidDataValueChanged(</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> data)</P><P>{</P></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2>&nbsp;&nbsp;&nbsp; // Be sure the callback delegate is non-null</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; if</FONT><FONT size=2> (mContext.Callback != </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>)</P><P>&nbsp;&nbsp;&nbsp; {</P><P></FONT><FONT color=#008000 size=2>&nbsp;&nbsp;&nbsp; // Invoke the delegate</P></FONT><FONT size=2><P>&nbsp;&nbsp;&nbsp; mContext.CallBack(data);</P><P>&nbsp;&nbsp;&nbsp; }</P><P>}</P></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 29 Oct 2007 12:29:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1826#1826</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : http://www.codeplex.com/smartc...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1822#1822</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 29-Oct-2007 at 10:23am<br /><br /><a href="http://www.codeplex.com/smartclient/Thread/View.aspx?ThreadId=5260" target="_blank">http://www.codeplex.com/smartclient/Thread/View.aspx?ThreadId=5260<DIV>&nbsp;</DIV><DIV></A><DIV></DIV><DIV></DIV>So, Chris Holmes suggests that one should avoid making controls public, but he doesn't say why.&nbsp; Can anyone shed some light on this?</DIV>]]>
   </description>
   <pubDate>Mon, 29 Oct 2007 10:23:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1822#1822</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication :  Originally posted by Bill Jensen 2b....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1815#1815</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 27-Oct-2007 at 11:49am<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by Bill Jensen</strong></em><br /><br /><DIV>2b.&nbsp; Supply one or more delegates (to methods of the controller) in the view context that the presenter can call when necessary.&nbsp; This has the advantage of looser coupling--the presenter is only coupled to a method with a particular signature, and if the delegate is not set, it simply doesn't signal that information.</DIV><DIV></td></tr></table> </DIV><DIV>&nbsp;</DIV><DIV><FONT size=2>Would you mind presenting an example?&nbsp; I have no idea what you mean by supplying a delegate in the ViewContext.&nbsp; I do not see a mechanism for me to do that.</FONT></DIV><DIV><FONT size=2>&nbsp;</FONT></DIV><DIV><FONT size=2>Why couldn't I make the controls public?&nbsp; I suppose this is a major violation of something.&nbsp; I tried this.&nbsp; It works nicely.&nbsp; I created a view with just a bunch of DevEx controls.&nbsp; I made them public.&nbsp; I added a type-bound ControlBindingManager in the view code (not the&nbsp;GUI)&nbsp;because I have to pass the ControlBindingManager to the presenter (it breaks in every other way that I tried).&nbsp; In the presenter I setup the ControlBindingManager.&nbsp; No GUI involved.&nbsp; Build and run.&nbsp; Works fine.&nbsp; </FONT></DIV><DIV><FONT size=2>&nbsp;</FONT></DIV><DIV><FONT size=2>I am guessing that this ViewContext thing has done something like this already.&nbsp; Perhaps it registers the controls somewhere in the WorkItem, or something like that.&nbsp; From there maybe the presenter or controller can grab the control and do something with it.&nbsp; I don't know...things are getting really muddy, again.&nbsp; What I thought I understood yesterday is all turned on its head today.</FONT></DIV><span style="font-size:10px"><br /><br />Edited by Linguinut - 27-Oct-2007 at 11:51am</span>]]>
   </description>
   <pubDate>Sat, 27 Oct 2007 11:49:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1815#1815</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : I am drawing a blank on our other...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1779#1779</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 25-Oct-2007 at 10:29am<br /><br />I am drawing a blank on our other discussions.&nbsp; Sorry...must be the lack of coffee in my diet today.<DIV>&nbsp;</DIV><DIV>I am intrigued by 2b.&nbsp; I really want to maintain good MVP architecture; however, it is very difficult to break old programming patterns.&nbsp; It is an everyday struggle.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Thanks for the info!!</DIV>]]>
   </description>
   <pubDate>Thu, 25 Oct 2007 10:29:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1779#1779</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : As we&amp;#039;ver discussed in other...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1767#1767</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 24-Oct-2007 at 11:11am<br /><br /><DIV>As we'ver discussed in other threads,&nbsp;the mechanism for communicating between a presenter and its view controller is the view context.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>The steps are:</DIV><DIV>&nbsp;</DIV><DIV>1. The controller creates the view context and adds it to the workitem under a unique view id.</DIV><DIV>&nbsp;</DIV><DIV>2.&nbsp; The controller then creates the view, possibly using the ViewFactoryService, and adds it to the workitem under the same unique view id.</DIV><DIV>&nbsp; </DIV><DIV>3.&nbsp; The&nbsp;object builder&nbsp;injects the presenter into the view&nbsp;(causing its creation by the object builder).</DIV><DIV>&nbsp;</DIV><DIV>4.&nbsp; The view&nbsp;informs the presenter itself and its unique view id.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>5.&nbsp; The presenter uses the unique view Id to retrieve the context for this particular view instance.</DIV><DIV>&nbsp;</DIV><DIV>If the presenter needs to communicate information back to the controller, there are a couple of approaches:</DIV><DIV>&nbsp;</DIV><DIV>1.&nbsp; Just put the value you want to communicate in the view context.&nbsp; Both the presenter and controller have access to it.</DIV><DIV>&nbsp;</DIV><DIV>2a.&nbsp; For event signalling, put a reference to an object (use an Interface!) in the view context with methods to signal the&nbsp;event and call them in the presenter.&nbsp; This couples the presenter to the controller (or at least to the interface type).</DIV><DIV>&nbsp;</DIV><DIV>2b.&nbsp; Supply one or more delegates (to methods of the controller) in the view context that the presenter can call when necessary.&nbsp; This has the advantage of looser coupling--the presenter is only coupled to a method with a particular signature, and if the delegate is not set, it simply doesn't signal that information.</DIV><DIV>&nbsp;</DIV><DIV>Of course, in keeping with good MVP architecture, the view should field the raw "ValueChanged" or "Click" event from the control and do nothing except call a method on the presenter.</DIV><DIV>&nbsp;</DIV><DIV>I'm not sure of the significance of the ListConverter.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Wed, 24 Oct 2007 11:11:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1767#1767</guid>
  </item> 
  <item>
   <title>TabViewController - View Communication : If I have a controlon a view,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1760#1760</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 520<br /><strong>Posted:</strong> 23-Oct-2007 at 6:29pm<br /><br /><P>If I have a control&nbsp;on a view, and the view has a presenter, and the view has a TabViewController...</P><DIV>(pause for a breath...)</DIV><DIV>&nbsp;</DIV><DIV>...and I want to get the value of the control from the TabViewController, how do I do that?&nbsp; The catch...the control is associated with a ListConverter.</DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>Bill</DIV><span style="font-size:10px"><br /><br />Edited by Linguinut - 12-Nov-2007 at 4:43pm</span>]]>
   </description>
   <pubDate>Tue, 23 Oct 2007 18:29:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=520&amp;PID=1760#1760</guid>
  </item> 
 </channel>
</rss>