 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Augusto Guest
|
Posted: Tue Dec 30, 2003 11:54 am Post subject: To the most experienced!! |
|
|
Hello all!! I'm here testing you and helping others to improve their delphi
skills with your help.
I've created an app in which I added a Automation Object.
In the com I've put a Method pointing to a procedure that was in my app
main's form for tests purposes.
This procedure receives a parameter and set the visibility of a form
component.
I call this procedure from a msscriptcontrol and execute it normally. It
works fine.
What I want to do, is to expose all my app objects through COM so I can
change every componente property and access all their methods.
I know it's easy by creating all the properties and method in the interface
of the Automation Object.
But my wish is to do it dynamicaly. I want to read the properties and
methods from a dataset and create them at runtime.
Suppose I have a form and it's clear (No controls) I will access a
table(DefinitionsTbl) in my database and put a record like that:
Name Caption Color Hint
Class
----------------------------------------------------------------------------
----------
edit1 CustID white Set customer
identification TEditBox
Ok! When I start my app, I will read this table and create this component at
runtime, and also will expose it and all his properties (only those above)
and methods (onclick, onchange, etc..) through my COM interface. So I can
handle it through MSScript Control.
Did I make myself clear?
Any Idea, or documentation about it?
I'm creating an application generator.
Thanks in Advance
Augusto
|
|
| Back to top |
|
 |
Avatar Zondertau Guest
|
Posted: Thu Jan 01, 2004 1:51 pm Post subject: Re: To the most experienced!! |
|
|
| Quote: | What I want to do, is to expose all my app objects through COM so I can
change every componente property and access all their methods.
I know it's easy by creating all the properties and method in the
interface
of the Automation Object.
But my wish is to do it dynamicaly. I want to read the properties and
methods from a dataset and create them at runtime.
|
You should make your implementation for IDispatch to do this, which means
implementing the four functions described at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap5_78v9.asp
for your automation object. I think this is the only way to dynamically
change the interface to your automation object.
BTW i think it might be better if you gave your posts more descriptive
subjects in the future
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|