Scopo
Ritorna la versione di un oggetto. Le versioni di ciascun oggetto sono specificate nella relativa lista valori delle proprietà. Ad esempio l'oggetto Query/Vista ha come versioni Master, Lookup e Value Source.
Sintassi
int versione = 0 //
//
versione := INDE.GetObjVersion(id oggetto)
//
versione := INDE.GetObjVersion(id oggetto)
Argomenti
ID Oggetto | Puntatore dell'oggetto |
Valore di ritorno
Viene ritornato un intero corrispondente alla versione di un oggetto. Consultare la lista valori specifica dell'oggetto per conoscere le versioni possibili. Qualora l'oggetto non possegga una versione specifica la funzione restituisce il valoer Zero.
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
{
int vers = 0 //
//
// Recupero la versione dell'oggetto
vers := EsempiMS.INDE.GetObjVersion(Puntatore)
}
//
Client
...
//
Library
...
//
Prop Type
...
//
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
{
int vers = 0 //
//
// Recupero la versione dell'oggetto
vers := EsempiMS.INDE.GetObjVersion(Puntatore)
}
//
Client
...
//
Library
...
//
Prop Type
...
//
Drop Text
...
}
}
catch
{
return False
}
//
this.SetOriginal()
//
return True
}
- Se il puntatore passato come parametro ID Oggetto non corrisponde ad alcun oggetto nel progetto aperto, allora verrà generata un'eccezione.
Ultima modifica: 07/11/2008 / Validità: da 7.1.3300