<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:st1 = 
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name="place" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType 
name="PersonName" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<![endif]-->
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue bgColor=white>
<DIV><FONT face=Arial size=2>3) Okay. Good point. I didn't pick up on this, as 
you hadn't marked the procedures as virtual, but I guess that can always be 
added later without breaking&nbsp;existing code.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>4) Have you considered&nbsp;RegisterIntegerConsts() 
for converting message integers to text?</FONT></DIV>
<DIV><FONT face=Arial size=2>Or failing that I often use something like 
this</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>type</FONT></DIV>
<DIV><FONT face=Arial size=2>TMessageType = 
(mtUnknown,mtChange,mtSave,mtLoad)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>const</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; MessageTypeToText : array[TMessageType 
] of string = ('Unknown','Change','Save','Load');</FONT><FONT face=Arial 
size=2>&nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>That way, whenever I add an enumeration, I have to 
also add an equivalent string description.</FONT></DIV>
<DIV><FONT face=Arial size=2>To convert the text back to an enumerated type, I 
just use a standard procedure to find the index of the text in the array. By 
making the first enumeration unknown/default I always get a meaningful result 
when casting the integer back to a type.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Type := 
TMessageType(IndexOf(MessageText,MessageTypeToText);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>function IndexOf(AName : String; AStringArray : 
array of string) : Integer;<BR>var<BR>&nbsp; NameIndex, FoundIndex : 
Integer;<BR>&nbsp; CurrentName : String;<BR>begin<BR>&nbsp; NameIndex := 
0;<BR>&nbsp; FoundIndex := 0;<BR>&nbsp; while (NameIndex &lt; 
length(AStringArray)) and (FoundIndex = 0) do<BR>&nbsp; 
begin<BR>&nbsp;&nbsp;&nbsp; CurrentName := 
AStringArray[NameIndex];<BR>&nbsp;&nbsp;&nbsp; if SameText(AName,CurrentName) 
then<BR>&nbsp;&nbsp;&nbsp; begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FoundIndex := 
NameIndex;<BR>&nbsp;&nbsp;&nbsp; end;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; inc(NameIndex);<BR>&nbsp; 
end;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp; Result := FoundIndex;<BR>end;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>However, I see your point 
about&nbsp;streaming&nbsp;numbers to&nbsp;XML</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp; &nbsp; </FONT></DIV>
<DIV><FONT face=Arial size=2>Todd.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=kyley@harrissoftware.com href="mailto:kyley@harrissoftware.com">Kyley 
  Harris</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@ns3.123.co.nz 
  href="mailto:delphi@ns3.123.co.nz">NZ Borland Developers Group - Delphi 
  List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 15, 2006 11:05 AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [DUG] Discussion &amp; 
  Donation</DIV>
  <DIV><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thank.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Point 1/ Fair 
  enough<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Point 2/ correct . I 
  had written that bit early on before I realized I could break it down 
  correctly with TMethdo.code and TMethod.Data and I haven’t fully refactored it 
  yet. I’ve removed it now.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Point 3/ Because you 
  cant do anything with a bunch of procedures. Ie it is not portable. Class 
  functions can be overridden. You don’t need to use 
  TNotifier.AddListener,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;You could have 
  for example add a meta class and a classvariable to the global, Var 
  NotifierClass:TNotiferClass = TNotifer. I then use this for accessing the 
  functions and down the track in some cases or applications you may wish to 
  modify how it works, without effecting All the other apps by simply changing 
  the class pointer. static procedures do not lend themselves to upgrading 
  software without breaking old software and this is one of the most powerful 
  uses of static classes as libraries that many people in <st1:place 
  w:st="on">Delphi</st1:place> don’t take advantage of. 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Point 4. I use 
  constants, so I don’t have typos in message names (except for demos). And I 
  use SameText, so they are not case-sensitve. I do this purely because I prefer 
  debugging meaningful strings rather than integers. It also makes It easier 
  when dealing with storage of types etc in human readable XML. So that’s why I 
  do it. Many books use integers. I just don’t like it. Also. A lot of my 
  infrastructor permits streaming of the entire message, and the data object 
  over TCP as part of the notification. I prefer unknown apps receiving this to 
  get a meaningful ‘CLIENT_OBJECT_UPDATED’ rather than 3 
  ;)<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The StringList is 
  indexed, and its very fast, I’ve tested with thousands of binds with no real 
  time effect. The work done by listeners is the time issue. Not the 
  lookup.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I used to have an 
  observer and observed class system too. And it was really annoying when you 
  had to make changes. I even wrote a plugin for the IDE to convert an object 
  into a listener etc by inserting all the code for me. So that took the hassle 
  out. But I prefer the decoupled method. <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks for the 
  feedback. <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
  face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
  <HR tabIndex=-1 align=center width="100%" SIZE=2>
  </SPAN></FONT></DIV>
  <P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
  face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> 
  delphi-bounces@ns3.123.co.nz [mailto:delphi-bounces@ns3.123.co.nz] <B><SPAN 
  style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Todd Martin<BR><B><SPAN 
  style="FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, 15 May 2006 10:38 
  a.m.<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> <st1:PersonName 
  w:st="on">NZ Borland Developers Group - <st1:place 
  w:st="on">Delphi</st1:place> List</st1:PersonName><BR><B><SPAN 
  style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [DUG] Discussion &amp; 
  Donation</SPAN></FONT><o:p></o:p></P></DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Well you said you wanted feedback, 
  so I hope this isn't too picky.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">1) I find the inconsistent use of 
  variable prefixes a bit annoying. I tend to stick 
  with</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">F- class 
  field</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">A - method 
  parameter</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">P - 
  pointer</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">and no prefixes for class 
  properties or local variables.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">2)&nbsp;TListenerItem.FListener is 
  redundant, since the information it contains is already held in 
  TListenerItem.FBindMethod</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">It could have been implemented as 
  a function, but I don't see why it is 
  needed.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">As usual, redundancy leads 
  to&nbsp;complication elsewhere</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">eg.&nbsp; if 
  (MethodEquals(TMethod(Items[i].FBindMethod) ,TMethod(ABinder))) and 
  (Items[i].FListener = AListener) then</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">the second condition is 
  automatically&nbsp;satisfied by the first 
  condition.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">3) Why define a TNotifier class 
  when all its methods are static? They could be defined as simple 
  procedures/functions in the unit.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">4) I'm not keen on the idea of 
  passing a string parameter to identify the message type, for the simple reason 
  that spelling mistakes can arise and you're never really sure at compile 
  time&nbsp;what "messages" are being broadcast/handled. This problem 
  can&nbsp;of course be ameliorated through the use of constants, but I prefer 
  the use of an enumerated type.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Having said all that. I like the 
  loose coupling of your solution. I have implemented the observer pattern 
  previously with the lists maintained internally by the objects involved, so 
  removing the need to inherit from a particular class is a great improvement. I 
  hadn't considered that option before. Of course you do pay a miniscule 
  performance penalty in having to find the correct list for the object. Perhaps 
  the&nbsp;use of THashedstringlist could mitigate this 
  further.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Todd.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
  <BLOCKQUOTE 
  style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; MARGIN: 5pt 0cm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none">
    <DIV>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">----- Original Message ----- 
    <o:p></o:p></SPAN></FONT></P></DIV>
    <DIV style="font-color: black">
    <P class=MsoNormal style="BACKGROUND: #e4e4e4"><B><FONT face=Arial 
    size=2><SPAN 
    style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">From:</SPAN></FONT></B><FONT 
    face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <A 
    title=kyley@harrissoftware.com href="mailto:kyley@harrissoftware.com">Kyley 
    Harris</A> <o:p></o:p></SPAN></FONT></P></DIV>
    <DIV>
    <P class=MsoNormal><B><FONT face=Arial size=2><SPAN 
    style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">To:</SPAN></FONT></B><FONT 
    face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <A 
    title=delphi@ns3.123.co.nz href="mailto:delphi@ns3.123.co.nz">NZ Borland 
    Developers Group - Delphi List</A> <o:p></o:p></SPAN></FONT></P></DIV>
    <DIV>
    <P class=MsoNormal><B><FONT face=Arial size=2><SPAN 
    style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">Sent:</SPAN></FONT></B><FONT 
    face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 
    Wednesday, May 10, 2006 3:36 PM<o:p></o:p></SPAN></FONT></P></DIV>
    <DIV>
    <P class=MsoNormal><B><FONT face=Arial size=2><SPAN 
    style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">Subject:</SPAN></FONT></B><FONT 
    face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> [DUG] 
    Discussion &amp; Donation<o:p></o:p></SPAN></FONT></P></DIV>
    <DIV>
    <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
    style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">In an attempt to create some 
    more interesting discussion, other than talking about the crud IDE issues, I 
    am donating some useful code for discussion, rather than for help. Feel free 
    to keep/use the code if you want to. Be mean if you feel the need (but if 
    your personal then watch out ;) Hopefully this may introduce a discussion 
    where people learn something, or are able to contribute some interesting 
    ideas/information about the topic (which is object notification and 
    observation).<o:p></o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">In the attached zip is a sample 
    application showing a basic, but horrible use of the class in uNotifier.pas. 
    TNotifer is a class I wrote a long while back which loosely follows an 
    observer pattern for allowing one-to-many observations between an object, 
    and a bunch of interested object. <o:p></o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The main difference this class 
    has between many observer patterns is that you do not have to modify 
    existing classes, or sub-class anything, or instantiate anything in your 
    existing objects. The TNotifier handles all the bindings, you just need to 
    implement one listening event on each listening 
    object.<o:p></o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The sample app is a corny app 
    that makes child forms (button click) update a memo based on changes to the 
    memo on the main form. God help me if I ever did anything as potentially 
    unthread safe as that in a real app.<o:p></o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=MsoNormal><FONT face=Arial size=2><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Fun fun fun…. (I hope the app 
    compiles. You never know with these tricky little sample 
    apps)<o:p></o:p></SPAN></FONT></P>
    <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
    face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
    <HR align=center width="100%" SIZE=2>
    </SPAN></FONT></DIV>
    <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
    style="FONT-SIZE: 12pt">_______________________________________________<BR><st1:place 
    w:st="on">Delphi</st1:place> mailing 
    list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<o:p></o:p></SPAN></FONT></P>
    <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
    face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
    <HR align=center width="100%" SIZE=2>
    </SPAN></FONT></DIV>
    <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
    style="FONT-SIZE: 12pt">Internal Virus Database is out-of-date.<BR>Checked 
    by AVG Free Edition.<BR>Version: 7.1.385 / Virus Database: 268.5.1/327 - 
    Release Date: 28/04/2006<o:p></o:p></SPAN></FONT></P></BLOCKQUOTE></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Delphi mailing 
  list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR>
  <P>
  <HR>

  <P></P>Internal Virus Database is out-of-date.<BR>Checked by AVG Free 
  Edition.<BR>Version: 7.1.385 / Virus Database: 268.5.1/327 - Release Date: 
  28/04/2006<BR></BLOCKQUOTE></BODY></HTML>