Scopo
La funzione restituisce il tipo di una delle proprietà dell'oggetto indicato. E' possibile consultare la lista Tipi Proprietà per conoscere i possibili risultati della funzione.
Sintassi
int tipo = 0 //
//
tipo := INDE.GetPropType(id oggetto, proprietà)
//
tipo := INDE.GetPropType(id oggetto, proprietà)
Argomenti
| ID Oggetto | Puntatore dell'oggetto |
| Proprietà | Indice della proprietà di cui leggere il tipo |
Valore di ritorno
Viene ritornato un intero corrispondente al tipo della proprietà dell'oggetto.
Esempio di codice
// ************************
// Carica l'oggetto da INDE
// ************************
public boolean OggettoBase.LoadFromINDE(
int Puntatore // Puntatore dell'oggetto
)
{
// Imposto il puntatore
Puntatore := Puntatore
//
// Provo a recuperare le proprietà
try
{
// Carico le proprietà
GUID := EsempiMS.INDE.GetPropGUID(Puntatore, GUID, ??)
Tipo := EsempiMS.INDE.GetObjType(Puntatore)
//
if EsempiMS.INDE.IsPropReadable(Puntatore, Nome)
...
//
if EsempiMS.INDE.IsPropReadable(Puntatore, Descrizione)
...
//
if EsempiMS.INDE.IsPropReadable(Puntatore, Codice)
...
//
CodiceAutomatico := EsempiMS.INDE.TestFlag(Puntatore, Codice automatico)
//
Altro
{
Versione
...
//
Client
...
//
Library
...
//
Prop Type
{
int PropType = 0 //
//
// Leggo il tipo di una certa proprietà
PropType := EsempiMS.INDE.GetPropType(Puntatore, Immagine)
}
//
Drop Text
...
}
}
catch
{
return False
}
//
this.SetOriginal()
//
return True
}
// Carica l'oggetto da INDE
// ************************
public boolean OggettoBase.LoadFromINDE(
int Puntatore // Puntatore dell'oggetto
)
{
// Imposto il puntatore
Puntatore := Puntatore
//
// Provo a recuperare le proprietà
try
{
// Carico le proprietà
GUID := EsempiMS.INDE.GetPropGUID(Puntatore, GUID, ??)
Tipo := EsempiMS.INDE.GetObjType(Puntatore)
//
if EsempiMS.INDE.IsPropReadable(Puntatore, Nome)
...
//
if EsempiMS.INDE.IsPropReadable(Puntatore, Descrizione)
...
//
if EsempiMS.INDE.IsPropReadable(Puntatore, Codice)
...
//
CodiceAutomatico := EsempiMS.INDE.TestFlag(Puntatore, Codice automatico)
//
Altro
{
Versione
...
//
Client
...
//
Library
...
//
Prop Type
{
int PropType = 0 //
//
// Leggo il tipo di una certa proprietà
PropType := EsempiMS.INDE.GetPropType(Puntatore, Immagine)
}
//
Drop Text
...
}
}
catch
{
return False
}
//
this.SetOriginal()
//
return True
}
- Se viene chiesto il tipo di una proprietà che l'oggetto specificato non ha viene generata un'eccezione.
- Se il puntatore passato come parametro ID Oggetto non corrisponde ad alcun oggetto nel progetto aperto, allora verrà generata un'eccezione.
- Questo metodo può essere usato per scorrere le proprietà degli oggetti, incrementando un contatore come indice, per individuare il tipo di ogni proprietà al fine di sapere quali metodi utilizzare per leggere o scrivere i valori.
Ultima modifica: 07/11/2008 / Validità: da 7.1.3300
funzione