First of all. I'm using D2007 and D7, and have the same problem with
both Delphi's. 

I've made a couple of descendents of TOwnedCollection, and everything
works perfectly. I can add new items, and very important to my
application, everything streams correctly. 

BUT.... when I add another of my descendents to the CollectionItem, and
then add the first item to the collection, I can fill in the properties
for the first item, and I get the ellipse button when I reach the
embedded collection, but when I click on it nothing happens. 

Sorry, I know this explanation probably isn't making sense, so below is
a quick explanation of what I mean. I'm typing this from memory, so
please accept a couple of mistakes.

MySecondCollectionItem = class(TCollectionItem)
Private
  FAnotherValue = integer
Published
  Property AnotherValue : integer read FAnotherValue write
FAnotherValue;
End;

MySecondCollection = class(TOwnedCollection)
  // all the properties.
End;

MyFirstCollectionItem = class (TCollectionItem)
private
  fsomeValue : integer;
  fSecondCollection : TSecondCollection;
published
  property SomeValue : integer read fsomeValue write fsomeValue;
  property SecondCollection : TSecondCollection
              read fSecondCollection
              write fSecondCollection;
end;

MyFirstCollection = class(TOwnedCollection)
  // all the properties.
End;

I also have a CollectionClass for each of these CollectionItem classes,
and two Components that use each of the Collections. 

I've overridden all the necessary properties/methods/events in the
Collections, and the CollectionItems, and everything works perfectly in
code. The problem is in the Object Inspector. When I add a
MyFirstCollectionItem to the MyFirstCollection, I can fill in the value
of the SomeValue property, and then when I select the SecondCollection
property I get the ellipse button, but when I click on the ellipse
button, I expect to get the Collection Popup dialog that allows me to
add items to the Second Collection, and nothing happens. 

I can post the actual code if anyone thinks they can help. 

Alternatively, does anyone have a working example of a Collection that
has another collection embedded in it, and that works properly in the
Object Inspector so that I can compare my code to theirs' and find the
problem.




Sincerely,

Brad Gies
-------------------------------------
NLM Software
Southfield, MI, USA
------------------------------------- 

If you get today's work done today, but do it in a way that you can't
possibly get tomorrow's work done tomorrow, then you lose. 



This e-mail or communication, including any attachments, is intended only for 
the person or entity
to which it is addressed and may contain confidential and/or legally privileged 
material.  Any review,
retransmission, dissemination or other use of, or taking of any action in 
reliance upon, this
information by persons or entities other than the intended recipient is 
prohibited.  If you received
this message in error, please contact the sender immediately and permanently 
delete all copies,
electronic or other, you may have or from your computer. Any disclosure, 
copying, distribution,
reliance or use of the contents or information received in error is strictly 
prohibited.
The foregoing applies even if this notice is imbedded in a message that is 
forwarded or attached.
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk

Reply via email to