<br><br><div class="gmail_quote">On 17 November 2010 10:39, Frank Church <span dir="ltr"><<a href="mailto:vfclists@gmail.com">vfclists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>I don't know whether interfaces are what I am looking for here.<br><br>I am creating an object called TStateInfoSource which needs to display its state using different objects, mainly a TForm, a TFrame, some future TComponent based visual object and a web interface as yet undecided.<br>
<br>eg, both the TForm, the TFrame and web object are to implement a function called DisplayState in their own way.<br><br>Is there some way to create some kind of type definition called a TImplementsDisplayState so that TStateInfoSource can call the DisplayState function of TImplementsDisplayState object it is associated with at runtime?<br>
<br>In effect the TImplementsDisplayState facility is added or associated with existing objects, rather then having TForm, TFrame etc as its sub properties or components. In this way the display code is implemented directly by the form or frame, rather than having the TImplementsDisplayState object manipulate the form or frame's elements directly.<br>
<br>In effect is it possible to put a group of unrelated objects into the same type definition by adding to them a set of identically defined functions?<br clear="all"><font color="#888888"><br>-- <br>Frank Church<br><br>
=======================<br>
<a href="http://devblog.brahmancreations.com" target="_blank">http://devblog.brahmancreations.com</a><br>
</font></blockquote></div><br>I think interfaces are what I need here. I'm going to do some more reading.<br clear="all"><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>