<!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">
Hurrah!<br>
<br>
Thanks David, slightly different units but the methodology was the
same. There is no DmDesigner in the Delphi6 installation. I made a
design time only package and added designide.dcp which I assumed is the
Delphi6 equivalent to DsnIDE50 (there was no DsnIDE60) and it now
compiles in DesignEditors without any problems. The
TDataModuleDesignerCustomModule class is wrapped up in designide in a
contained unit called DMForm.<br>
<br>
It works now anyway. Thanks for your help.<br>
Phil.<br>
<font color="navy" face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: navy;"></span></font><br>
David Brennan wrote:
<blockquote cite="mid20050609005707.2E05282C02@smtp-1.paradise.net.nz"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[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
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place">
<o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:21.0cm 842.0pt;
        margin:72.0pt 89.85pt 72.0pt 89.85pt;}
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]-->
</o:SmartTagType></o:SmartTagType>
<div class="Section1">
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Phil,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">It was
actually commented in the uses
clause of my sample: <o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal" style=""><font color="navy" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: navy;">uses<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font color="navy" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: navy;">
Classes, DsgnIntf,<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font color="navy" face="Courier New"
size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: navy;">
DmDesigner, // Contains TDataModuleDesignerCustomModule<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: navy;">
WctlForm; //
Contains TWinControlCustomModule<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">So it should
be in DmDesigner, but I’m
using <st1:place w:st="on">Delphi</st1:place> 5 and it is possible it
has been
moved. You won’t have source .pas files for these unfortunately. You
also
won’t be able to directly recompile them. Our unit which registers
these
designers for our custom TDbbForm, TDbbDataModule etc is in a separate
design
time only package which uses the DsnIDE50 package which contains the
compiled
code for the design units like DmDesigner. I assume the <st1:place
w:st="on">Delphi</st1:place>
6 package would be called DsnIDE60 (or similar) but simply creating a
package with
your register unit and compiling it should bring up a dialog to
automatically
add the required packages.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Courier New" size="2"><span
style="font-size: 10pt; font-family: "Courier New"; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">As for what
they are, yes, I believe the
CustomModules and their associated objects/units are all about bringing
up the
design time representation of the Form/DataModule/Frame which is where
you drag
components around and set their properties. If you don’t register a
CustomModule then the design time representation doesn’t work properly
–
for example any properties you have added won’t appear in the object
inspector.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Disclaimer:
Things might be slightly
different in <st1:place w:st="on">Delphi</st1:place> 6 with this stuff.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">David.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font
color="black" face="Times New Roman" size="3"><span
style="font-size: 12pt; color: windowtext;">
<hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
<p class="MsoNormal"><b><font color="black" face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; color: windowtext; font-weight: bold;">From:</span></font></b><font
color="black" face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@ns3.123.co.nz">delphi-bounces@ns3.123.co.nz</a>
[<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>] <b><span
style="font-weight: bold;">On
Behalf Of </span></b>Phil Middlemiss<br>
<b><span style="font-weight: bold;">Sent:</span></b> Thursday, 9 June
2005 12:28
p.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]
descending from
TWebModule</span></font><font color="black"><span
style="color: windowtext;"><o:p></o:p></span></font></p>
</div>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font color="black" face="Times New Roman"
size="3"><span style="font-size: 12pt;">Dave, I can't find
TDataModuleDesignerCustomModule
anywhere - which unit is it in? I'm using <st1:place w:st="on">Delphi</st1:place>
6 which has DesignIntf, not DsgnIntf.<br>
<br>
There is a TCustomModule in DesignEditors.pas, but if I try to use that
then
DesignEditors wont compile since it requires Proxies.pas which is not
provided,
and there is no dcu provided for DesignEditors either.<br>
I'm not very familiar with the ToolsAPI classes so the help is much
appreciated.
BTW, what actually *is* the "designer"? I am assuming that, for the
TForm for example, it is the representation of the TForm that lets you
manipulate components on it and interact with the ObjectInspector - is
that
correct?<br>
<br>
Cheers,<br>
Phil.<br>
<br>
David Brennan wrote: <o:p></o:p></span></font></p>
<pre wrap=""><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">Phil,<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">Neither do TForm or TDataModule - they aren't meant to. TCustomModule is (to<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">my knowledge) a helper class used by DsgnIntf to provide the design time<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">interface used for Forms, DataModules, Frames, etc. <o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">TWebModule is a descendent of TDataModule. You should therefore be able to<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">use the standard TDataModuleDesignerCustomModule. That is:<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> RegisterNoIcon([TPhilsWebModule]);<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> RegisterCustomModule(TPhilsWebModule, TDataModuleDesignerCustomModule);<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">You could also make your own descendent of TDataModuleDesignerCustomModule<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">if you wanted but I doubt you actually want to change the designer<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">behaviour.<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">That should work fine unless TWebModules have a special designer (I don't<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">use them myself so I wouldn't know). If they do then you will need to try to<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">work out which unit contains the designer for TWebModule (which is a matter<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">of guessing since <st1:place w:st="on">Delphi</st1:place> doesn't include the source code for most of these<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">design interface units). <o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">Unless of course I am misunderstanding what you are trying to do?<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">David.<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">-----Original Message-----<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">Unfortunately that didn't work since the TWebModule does not descend <o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">from TCustomModule.<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">Phil.<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">David Brennan wrote:<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> <o:p></o:p></span></font></pre>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
<pre wrap=""><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">Phil,<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">....<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> <o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">procedure Register;<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">begin<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> RegisterNoIcon([TDbbDataModule]);<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> RegisterCustomModule(TDbbDataModule, TDataModuleDesignerCustomModule);<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> RegisterNoIcon([TDbbForm]);<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> RegisterCustomModule(TDbbForm, TDbbFormCustomModule);<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> // Note: DON'T call RegisterNoIcon for TDbbFrame. This will disable copy<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">and<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> // paste of TDbbFrame descendents and make it impossible to place a new<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> // TDbbFrame descendent on a form.<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> RegisterCustomModule(TDbbFrame, TDbbFrameCustomModule);<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">end;<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">...<o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> <o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> <o:p></o:p></span></font></pre>
</blockquote>
<pre wrap=""><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">_______________________________________________<o:p></o:p></span></font></pre>
<pre><st1:place w:st="on"><font color="black" face="Courier New"
size="2"><span style="font-size: 10pt;">Delphi</span></font></st1:place> mailing list<o:p></o:p></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><a href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><a
href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a><o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;">_______________________________________________<o:p></o:p></span></font></pre>
<pre><st1:place w:st="on"><font color="black" face="Courier New"
size="2"><span style="font-size: 10pt;">Delphi</span></font></st1:place> mailing list<o:p></o:p></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><a href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><a
href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a><o:p></o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span
style="font-size: 10pt;"> <o:p></o:p></span></font></pre>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Delphi mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a>
<a class="moz-txt-link-freetext" href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a>
</pre>
</blockquote>
</body>
</html>