Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: using TCollection and TCollectionItem


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Jan 4, 2018 12:53 PM Last Post By: Remy Lebeau (Te...
Lex Dean

Posts: 132
Registered: 3/26/07
using TCollection and TCollectionItem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 22, 2017 1:30 PM
Having TCollection and TCollectionItem as part of my project for design time use

TCollectionItem puts up the project manager all controlled from in the IDE
is thier a safe way to obtain in design time out of TCollection or TCollectionItem a method identifying the selected TCollectionItem the user is using
I know TCollection does not have controls to identify design time as I can handle that in other code.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: using TCollection and TCollectionItem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 22, 2017 3:31 PM   in response to: Lex Dean in response to: Lex Dean
Lex Dean wrote:

TCollectionItem puts up the project manager all controlled from in
the IDE

I do not understand what you are saying.

is thier a safe way to obtain in design time out of TCollection or
TCollectionItem a method identifying the selected TCollectionItem
the user is using

I don't know if this works for collection items, but the design-time
IDesigner interface does have a GetSelections() method.

A Component/Property editor implemented in a design-time package has
access to the Form Designer's IDesigner interface. So, you might be
able to create an editor for your component and have it query the
currently selected objects.

There is no interface (that I know of) for accessing the Object
Inspector or any popup editors it opens.

--
Remy Lebeau (TeamB)
Lex Dean

Posts: 132
Registered: 3/26/07
Re: using TCollection and TCollectionItem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 29, 2017 1:25 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Looks like a big can of worms.
Correct me GetSelections() method is not a method in TCollection or TCollectionItem

Now
DesignIntf.pas has: -

IDesigner = interface;
IDesigner60 = interface
procedure GetSelections(const List: IDesignerSelections);

And IDesignerSelections look like a cut down TList
The 1st Item is what I want, as normally you only select one Item at a time when you are coding.
more than one only if you are copying objects.

If I call this how do I go about it, example so I end up with a prompt as the operator selects a TCollectionItem the IDE designer.
Can the processor thread come out of GetSelections and how do I get the thread to run this.

Do you have a example and do you ave a object based off IDesigner60 as an example for me?
Best regards,
Lex Dean

Posts: 132
Registered: 3/26/07
Re: using TCollection and TCollectionItem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2018 3:59 AM   in response to: Lex Dean in response to: Lex Dean
I have been trying to rap my head around this new subject to me

And the penny dropped I'm dealing with a TPersistent object
IDesignerNotify uses TPersistent objects!!!!!!!!
The IDE uses TComponents in the form that work in with IDesigner60
But that is not persistent objects.
Lex Dean

Posts: 132
Registered: 3/26/07
Re: using TCollection and TCollectionItem  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2018 5:12 PM   in response to: Lex Dean in response to: Lex Dean
ColnEdit.CollectionEditor

How do I use this thing
is it an example of the TCollection editor at design time

If I wrote my own TCollection and ColectionItem equivalent build do I get CollectionEditor to view/select the objects...
how to display CollectionEditor at design time to do this.
Any good editorials to tech me?

Lex Dean
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: using TCollection and TCollectionItem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2018 12:53 PM   in response to: Lex Dean in response to: Lex Dean
Lex Dean wrote:

ColnEdit.CollectionEditor

How do I use this thing

You don't need to.

is it an example of the TCollection editor at design time

Yes, it is the native collection editor.

If I wrote my own TCollection and ColectionItem equivalent build
do I get CollectionEditor to view/select the objects...

Yes, that is handled automatically.

how to display CollectionEditor at design time to do this.

You don't need to do anything extra for that. The IDE will handle that
automatically for you.

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: using TCollection and TCollectionItem [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2018 12:52 PM   in response to: Lex Dean in response to: Lex Dean
Lex Dean wrote:

And the penny dropped I'm dealing with a TPersistent object
IDesignerNotify uses TPersistent objects!!!!!!!!
The IDE uses TComponents in the form that work in with IDesigner60
But that is not persistent objects.

Yes, they are. TComponent derives from TPersistent.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02