Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Refreshing the component editor...

2 views
Skip to first unread message

David HAROUCHE

unread,
Apr 26, 2008, 7:20:39 PM4/26/08
to
Here are some defines :

type AnObject1 = class(TPersistent)
end

ArrayOfObjects1 = array of AnObject1;

AnObject2 = class(TPersistent)
Fobjects1:ArrayOfObjects1;
FIndex:Integer;

function GetObject1:AnObject1;

procedure SetObject1(_object:AnObject1);

published

property IndexOfObject:TInteger read FIndex write FIndex;
property AnObject1:AnObject1 read GetObject1 write SetObject1
end

that defines AnObject2 as a collection of AnObject1. Setting the
IndexOfObject will affect the GetObject1 result to reflect the indiced
FObjects1 !

At design time, when I change IndexOfObject as AnObject1 is expanded, no
changes seems to be done ! As I collapse AnObject1, and then expand it, I
can see that the indiced FObjects is correctly displayed !

Bug ?

In other words : how to force refreshing all the displayed properties at
design time when a change of one of them has been done ?

DH


Marc Rohloff [TeamB]

unread,
Apr 26, 2008, 10:08:00 PM4/26/08
to
On Sun, 27 Apr 2008 01:20:39 +0200, David HAROUCHE wrote:

> In other words : how to force refreshing all the displayed properties at
> design time when a change of one of them has been done ?

IMO, Just bad design. Why don't you publish your objects as a
TCollection like other objects do (TDataset.Fields, TDBGrid.Columns)?

--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com

Sérgio Alexandre

unread,
Apr 27, 2008, 12:56:21 PM4/27/08
to
Designtime "arrays" must use TCollection and TCollectionItem, they're
editable and streamable. (also, they're very good lists to work to...)

"David HAROUCHE" <met...@hotmail.com> escreveu na mensagem
news:4813...@newsgroups.borland.com...

David HAROUCHE

unread,
Apr 28, 2008, 2:09:46 PM4/28/08
to
> Designtime "arrays" must use TCollection and TCollectionItem, they're
> editable and streamable. (also, they're very good lists to work to...)
I thought about using it, but I ve got so many other things to learn
besides, that I've left TCollection appart !

I really appreciated TList becausse that's a basis for Object Languages, but
as we must use a second subclass as TCollection for the same purpose (except
design time), that made me so crazy that I really decided not to use it !

Maybe I'll combe back in the future, but that's not my point of view for now
!

Thanks anyway, TCollection is surely the right way to do it for design time
!

DH


David HAROUCHE

unread,
Apr 28, 2008, 2:06:43 PM4/28/08
to
> IMO, Just bad design.
Maybe, but that should work ! And its a fact, I hate to learn new classes
since I've been using ObjectVision...

DH


0 new messages