Re: [UOPL-Architect] how design uopl gui applications
Status: Planning
Brought to you by:
bsstmiller
|
From: Thomas M. <tm...@bs...> - 2004-12-21 19:47:32
|
Richard,
Did you get a chance to look at TNT? I just got done looking at it and
it resides side by side with
the VCL, not replacing it. All of the units, objects, etc start with
TNT. I have contacted the author
to see if he has any words of wisdom for us. So we still need to answer
the question, where do we
start? It is obvious we need to be careful about how we do things
around Persistent and Component,
but we may still be able to extend both.
Richard B Winston wrote:
>When I tried to use this technique, the component compiled OK but I got an
>access violation when I tried to install the component. This is what I
>expected. I believe that this means if UOPL starts from anything below
>TComponent, it will not be possible to place the UOPL components on the
>component palette.
>
>Here is what I did.
>
>1. I copied a Classes into a new unit called MyClasses
>2. In MyClasses, I changed the ancestor of TComponent from TPersistent to
>TInterfacedPersistent.
>3. I changed the declaration of QueryInterface to override the declaration
>in TInterfacedPersistent.
>
>before
> function QueryInterface(const IID: TGUID; out Obj): HResult; virtual;
>stdcall;
>after
> function QueryInterface(const IID: TGUID; out Obj): HResult; override;
>stdcall;
>
>4. I created a component in a new unit that used the version of TComponent
>in MyClasses.
>
>Here is a copy of that unit.
>
>unit ExperimentUnit;
>
>interface
>
>uses Classes, MyClasses;
>
>type
> TExperimentComponent = class(TComponent)
> private
> FInt1: integer;
> procedure SetInt1(const Value: integer);
> published
> property Int1: integer read FInt1 write SetInt1;
> end;
>
>procedure Register;
>
>implementation
>
>procedure Register;
>begin
> Classes.RegisterComponents('Experiments',
> [Classes.TComponentClass(TExperimentComponent)]);
>end;
>
>{ TExperimentComponent }
>
>procedure TExperimentComponent.SetInt1(const Value: integer);
>begin
> FInt1 := Value;
>end;
>
>end.
>
>Richard B. Winston
>rb...@us...
>http://water.usgs.gov/nrp/gwsoftware/
>703-648-5988
>on Fridays: 301 474-2762
>
>
>
> "Dennis Landi"
> <de...@de...> To: <uop...@li...>
> Sent by: cc:
> uop...@li... Subject: Re: [UOPL-Architect] how design uopl gui applications
> ceforge.net
>
>
> 12/03/2004 01:48 PM
> Please respond to
> uopl-architect
>
>
>
>
>
>
>Re: the tInterfacedPersistent -->> tInterfacedComponent descendants being
>registerable.
>
>It will be interesting to see if a tInterfacedComponent replica of the
>TComponent interface is registerable.
>
>I don't see why it wouldn't be... It will be an easy enough experiment to
>run.
>
>You would simply have to typecast it in the Registration proc.
>
>The registration syntax would be:
>
> RegisterComponents('MyComponentPage',[tComponentClass(TMyComponent)]);
>
>The interfaces of both artifacts would have to match; and if so, the IDE
>registration mechanism probably won't notice.
>
>This means that would have to hack the original source of tComponent; and
>clone a tInterfaceComponent version; which we would probably have to only
>be
>able to distribute as a DCU... But, I don't see that as a show-stopper.
>
>If the technique works, then we can actually introduce it to the delphi
>community, as it will allow them to unify artificacts at the component
>level, which will come in really handy for things like plug-ins.
>
>
>
>Dennis Landi
>Allied Data, Inc.
>800 204 2722
>http://www.dennislandi.com
>
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://productguide.itmanagersjournal.com/
>_______________________________________________
>UOPL-architect mailing list
>UOP...@li...
>https://lists.sourceforge.net/lists/listinfo/uopl-architect
>
>
>
>
>
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://productguide.itmanagersjournal.com/
>_______________________________________________
>UOPL-architect mailing list
>UOP...@li...
>https://lists.sourceforge.net/lists/listinfo/uopl-architect
>
>
>
--
Thomas Miller
Wash DC Delphi SIG Chairperson
Delphi Client/Server Certified Developer
BSS Accounting & Distribution Software
BSS Enterprise Accounting FrameWork
http://www.bss-software.com
http://www.cpcug.org/user/delphi/index.html
https://sourceforge.net/projects/uopl/
http://sourceforge.net/projects/dbexpressplus
|