Scopo
Questa proprietà è vera se la collection è già stata caricata dal database. Se, ad esempio, di un documento che possiede delle collection viene caricata solo la "testata" (cioè il livello 0) allora le sue collection rimangono vuote, ma si devono ricordare di non essere ancora state caricate dal database.
Sintassi
boolean l = 0 // Collection caricata?
//
l := Collection.Loaded
//
l := Collection.Loaded
Quando letta
Restituisce True se la collection è già stata caricata dal database, False altrimenti.Quando scritta
Imposta lo stato di caricamento dal database. Può essere utile per effettuare nuovamente il caricamento dal database della collection.
Esempio di codice
// ********************************************************************
// Fired by a tree to know which name should by shown for this document
// ********************************************************************
event Categoria.OnGetName(
inout string Name // Name of this document
int NameType // Name Type (i.e. 0 = standard name, 1 = full name...)
IDCollection CallerCollection // This is the collection this document is contained in.
int CallerForm // Caller Form Index
int CallerFrame // Caller Frame Index
)
{
string np = "???" // Numero di prodotti
//
if Prodotti.Loaded
{
np := ToString(Prodotti.Count())
}
//
// Nel nome della categoria voglio indicare il numero di prodotti
Name := FormatMessage(MSG Prodotti, Name, np, ??, ??, ??)
}
// Fired by a tree to know which name should by shown for this document
// ********************************************************************
event Categoria.OnGetName(
inout string Name // Name of this document
int NameType // Name Type (i.e. 0 = standard name, 1 = full name...)
IDCollection CallerCollection // This is the collection this document is contained in.
int CallerForm // Caller Form Index
int CallerFrame // Caller Frame Index
)
{
string np = "???" // Numero di prodotti
//
if Prodotti.Loaded
{
np := ToString(Prodotti.Count())
}
//
// Nel nome della categoria voglio indicare il numero di prodotti
Name := FormatMessage(MSG Prodotti, Name, np, ??, ??, ??)
}
- Per resettare lo stato di caricato delle collection e del documento è possibile utilizzare la procedura SetLoaded del documento stesso.
- Una collection con Loaded = True non viene ricaricata dal database dalle funzioni di caricamento del documento o delle collection.
Ultima modifica: 23/03/2021 / Validità: da 6.5.2680