DevExpress DBTreeList ExtLookupCombo Column
Posted: Wed Oct 14, 2015 1:09 pm
TsiLang has caused me a massive amount of wasted time this week.
I have a form called frmAssetTree with a DevExpress TcxDBTreeList, called tlAssets. This TreeList has a column (called tlAssetsAnalysisID) which had its Properties property set to LookupComboBox. There were 3 columns names in tlAssetsAnalysisID.Properties.ListFieldNames.
So, TsiLang had these 3 entries in the Collections section of the Editor:
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[0].Caption
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[1].Caption
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[2].Caption
That was all fine - exactly what I would expect.
Then I decided to change the tlAssetsAnalysisID column Properties from LookupComboBox to ExtLookupComboBox.
Now the Translation Editor shows nothing in the Collections tab. That is good because the ExtLookupComboBox does not have any collections of objects that have captions.
As usual, I saved my project to a SIL file and then exported it to a SIB file.
Before building my application I always clear all translations and then load the SIB file at runtime.
At runtime I get an error when I open the AssetTree form: "List index out of bounds (-1)".
I debugged siComp and discovered that it is still looking for tlAssetsAnalysisID.Properties.ListColumns[0].Caption.
So, opened the SIL file and in the Collections section I can see 2 of the original 3 lookup column captions:
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[0].Caption
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[1].Caption
They are also in the SIB file.
I presume this is why I get the error at runtime.
Have I done anything wrong or is it a problem with siLang?
How do put this right?
I have a form called frmAssetTree with a DevExpress TcxDBTreeList, called tlAssets. This TreeList has a column (called tlAssetsAnalysisID) which had its Properties property set to LookupComboBox. There were 3 columns names in tlAssetsAnalysisID.Properties.ListFieldNames.
So, TsiLang had these 3 entries in the Collections section of the Editor:
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[0].Caption
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[1].Caption
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[2].Caption
That was all fine - exactly what I would expect.
Then I decided to change the tlAssetsAnalysisID column Properties from LookupComboBox to ExtLookupComboBox.
Now the Translation Editor shows nothing in the Collections tab. That is good because the ExtLookupComboBox does not have any collections of objects that have captions.
As usual, I saved my project to a SIL file and then exported it to a SIB file.
Before building my application I always clear all translations and then load the SIB file at runtime.
At runtime I get an error when I open the AssetTree form: "List index out of bounds (-1)".
I debugged siComp and discovered that it is still looking for tlAssetsAnalysisID.Properties.ListColumns[0].Caption.
So, opened the SIL file and in the Collections section I can see 2 of the original 3 lookup column captions:
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[0].Caption
TfrmAssetTree.tlAssetsAnalysisID.Properties.ListColumns[1].Caption
They are also in the SIB file.
I presume this is why I get the error at runtime.
Have I done anything wrong or is it a problem with siLang?
How do put this right?