BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

To the most experienced!!

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Augusto
Guest





PostPosted: Tue Dec 30, 2003 11:54 am    Post subject: To the most experienced!! Reply with quote



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





PostPosted: Thu Jan 01, 2004 1:51 pm    Post subject: Re: To the most experienced!! Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.