<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Paul<br>
<br>
Put it in loaded at it works like a charm.&nbsp; Thanks for the help :)<br>
<br>
Rob<br>
<div class="moz-signature">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 11">
<meta name="Originator" content="Microsoft Word 11">
<link rel="File-List" href="Robert%20Martin_files/filelist.xml">
<title>Robert Martin</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>Wild Software Ltd</o:Author>
  <o:LastAuthor>Wild Software Ltd</o:LastAuthor>
  <o:Revision>6</o:Revision>
  <o:TotalTime>55</o:TotalTime>
  <o:Created>2009-02-13T02:47:00Z</o:Created>
  <o:LastSaved>2009-02-13T03:42:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>13</o:Words>
  <o:Characters>77</o:Characters>
  <o:Company>Wild Software Ltd</o:Company>
  <o:Lines>1</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>89</o:CharactersWithSpaces>
  <o:Version>11.9999</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]-->
<div class="Section1"><span style="color: rgb(255, 153, 0);"
 lang="EN-NZ"><o:p>&nbsp;</o:p></span>
<p class="MsoNormal"><span style="" lang="EN-NZ"><o:p>&nbsp;</o:p></span></p>
</div>
</div>
<br>
On 19/05/2010 10:33 a.m., Paul Heinz wrote:
<blockquote
 cite="mid:BC1F7E6C12B7154E9C7DF60C68D1E32FA1CDE4@zeus.Accredo.local"
 type="cite">
  <pre wrap="">Hi Rob

  </pre>
  <blockquote type="cite">
    <pre wrap="">I have some code in my constructor (override)

inherited;

fInternalPopupMenu  := nil

if ((csDesigning in ComponentState) = False) then begin
         CreateMenu;
end;

This code runs fine however my component ALWAYS thinks their 
is no popup assigned so always assigns one.  Stepping through 
the code at runtime the Createmenu function is called but the 
component shows popupmenu as nil (even though it has been 
assigned at design time), self.Name even shows as ''.
    </pre>
  </blockquote>
  <pre wrap="">
The object constructors are called by definition _before_ any properties
are streamed in so yes, PopupMenu and Name will always both be unset at
this point.

  </pre>
  <blockquote type="cite">
    <pre wrap="">I tried moving this to the onMouseDown event but the assigned 
popup, pops up before the event triggers (robbing me the 
opportunity to add my extra options).

Any suggestions on how to do this would be appreciated :)
    </pre>
  </blockquote>
  <pre wrap="">
Without knowing more context, I would suggest a Loaded method override
which is called once all properties are streamed in.

Cheers,
  Paul.


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe

  </pre>
</blockquote>
</body>
</html>