Thanks for the answer but... the problem is more complicated...

Even if I create a descending class for each TLinkedObjectProperty... I will not be able to use them...

Because I have 1 class per unit, y can´t have references to the item class in the interfase of the new class, because this way I will have a lot of circular references

I don´t see a solution... except keeping casting :-(

Horacio from Argentina


Graeme Geldenhuys escribió:
Horacio Jamilis wrote:
so, I can use... mylinkedproperty.obj.[prop] ... beeing [prop] any property of the object that is of class LinkedObjectClass, and avoiding to type TMyLinkeddObjectClass(mylinkedproperty.obj).[prop] ???

You can define TMyLinkeddObjectClass and override the property types so casting is only done in that class's implementation. All your instances of TMyLinkeddObjectClass doesn't have to do casting then.

Regards,
  - Graeme -

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to