Quintiq file version 2.0
|
#parent: #root
|
Method InitializeConversion
|
{
|
Description: 'Initialize the conversion of the object'
|
TextBody:
|
[*
|
this.UpdateVersion();
|
this.UpdateStart( DateTime::Now() );
|
|
// 1. Get the dataset status
|
allInfos := MDSEditor::Editor().ObjectInfos();
|
objInfo := select( allInfos, Elements, e, e.MDSID().MDSKey() = this.DatasetMDSID() )
|
|
// 1a. If the dataset is not loaded, we load it
|
if( not objInfo.IsLoaded() )
|
{
|
this.UpdateStatus( DMF_Utility::ID_DatasetLoading() );
|
// The dataset is loaded asynchronously, so the only time this conversion
|
// will continue is when ConvertorDataset receives the response from the real
|
// dataset that it is loaded, the method is DMF_ConvertorDataset::HandleOnConstructed
|
// Load the dataset
|
this.LoadMDS();
|
}
|
// 1b. Otherwise, we proceed straight to conversion
|
else
|
{
|
this.UpdateStatus( DMF_Utility::ID_Started() );
|
// Look for the first DatasetInConvertorVersion that hasn't begun
|
dciv := this.GetNextDatasetInConvertorVersion( this.First() );
|
|
if( not isnull( dciv ) )
|
{
|
// Initialize the conversion of that version
|
dciv.InitializeConversion();
|
}
|
}
|
*]
|
}
|