Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Delphi and dynamic properties

Delphi and dynamic properties

[lang_it]

Linguaggio : Borland Delphi 7

Sistema Operativo : Win Xp Pro

Come premessa a volte è necessario rendere l’applicazione che si stà  sviluppando il più flessibile possibile. Per evitare di avere migliaia di personalizzazioni per migliaia di clienti. Una cosa che può aiutare in questo è la modifica banale di alcune proprietà  dei componenti dell’applicaiozne stessa a runtime in funzione di particolari parametri.

In Delphi è possibile fare questo in modo molto semplice senza dover scrivere granchè di codice, per rendere ancora più semplice la cosa ho preparato una banale applicazione d’esempio scaricabile da :  [download id=”2″]

In particolare tale applicazione
:

  • mostra come sia possibile maneggiare un Componente (Oggetto) partendo dal nome dello stesso :

  • come ottenere l’elenco delle proprietà  e, dei relativi nomi, da un definito componente

  • impostare il valore di una proprietà  partendo dal componente a cui appartiene e dal suo nome

[/lang_it]

[lang_en]

Linguaggio : Borland Delphi 7

Sistema Operativo : Win Xp Pro

Sometimes, you need to extend the flexibility of your application, to prevent managinig thousands release of an application for thousands customore.One of the most important feature is the posibility of modify a component property value at runtime.

With Delphi is possible and simple to do like in this demo application: [download id=”2″]

The core features of this demo application are :
:

  • get an object from his name ,using a string, that can be filled in a ini file or xml or db table :

  • obtain the list of properties and published methods/event of the selected object

  • setting the value of a property, for simple we have used SetPropValue , an untyped method that use a variant as parameter to send to selected property of the object

[/lang_en]

Tags: , , , , ,

Lascia un commento