(I posted this as a comment in another thread, but thought I'd create a new one)
I'm just trying to build a TCollection and TCollectionItem set. Each individual TCollectionItem needs to have its own events. However, when I try to assign the published event property of one of these items, I get an error that the item is unnamed. Therefore, How do I give each TCollectionItem a unique name, which can be accessed as if it were a TComponent? I would also need be able to access this item directly from the code, so one collection may have 3 items: cmdOne, cmdTwo, and cmdThree (names), and be able to put somewhere cmdOne.Text:= 'MyText'; and cmdTwo.ExecuteCommand('blah');
Only then will it be able to have unique events. I don't want to have one universal event procedure for all items, and try to filter out with an if or case statement. I want each item to be assigned its own event procedure.
JD Solutions
I'm just trying to build a TCollection and TCollectionItem set. Each individual TCollectionItem needs to have its own events. However, when I try to assign the published event property of one of these items, I get an error that the item is unnamed. Therefore, How do I give each TCollectionItem a unique name, which can be accessed as if it were a TComponent? I would also need be able to access this item directly from the code, so one collection may have 3 items: cmdOne, cmdTwo, and cmdThree (names), and be able to put somewhere cmdOne.Text:= 'MyText'; and cmdTwo.ExecuteCommand('blah');
Only then will it be able to have unique events. I don't want to have one universal event procedure for all items, and try to filter out with an if or case statement. I want each item to be assigned its own event procedure.
JD Solutions