diff --git a/app/src/gambas3/.lang/.pot b/app/src/gambas3/.lang/.pot index 7ff7f7200..fbc42fa02 100644 --- a/app/src/gambas3/.lang/.pot +++ b/app/src/gambas3/.lang/.pot @@ -286,7 +286,7 @@ msgstr "" msgid "OpenGL display" msgstr "" -#: CComponent.class:443 +#: CComponent.class:444 msgid "Loading information on component &1..." msgstr "" diff --git a/app/src/gambas3/.src/Component/CComponent.class b/app/src/gambas3/.src/Component/CComponent.class index a590feaf0..1c68d39f5 100644 --- a/app/src/gambas3/.src/Component/CComponent.class +++ b/app/src/gambas3/.src/Component/CComponent.class @@ -425,6 +425,7 @@ Public Sub Load() Dim sLig As String Dim iPos As Integer Dim hClass As CClassInfo + Dim hParent As CClassInfo Dim hSym As CSymbolInfo Dim hProp As CPropertyInfo Dim sParent As String @@ -601,37 +602,29 @@ Public Sub Load() hSym = hClass.Symbols["_IsForm"] If hSym And If hSym.Value Then + If hClass.Parent Then + hParent = Classes[hClass.ParentComponent &/ hClass.Parent] + hSym = hParent.Symbols["_IsForm"] + If hSym And If hSym.Value Then + Hiddens.Add(sClass) + Continue + Endif + Endif + hSym = hClass.Symbols["_HiddenControls"] - If hSym Then Hiddens = Split(hSym.Value, ",") + If hSym Then Hiddens.Insert(Split(hSym.Value, ",")) + Endif Next - ' For Each sClass In Hiddens - ' If Classes.Exist(sClass) Then - ' Classes[Key &/ sClass].InitControl() - ' iPos = Controls.Find(sClass) - ' If iPos >= 0 Then Controls.Remove(iPos) - ' Endif - ' Next - ' - ' the upper code is the original code, I expanded - ' - ' this hack is because I can not load my projects into the IDE any more - ' seames to be a problem with requirement - ' the worst is, once loaded they work well - ' Charlie 03/08/2012 (after rev.5004) + ' _HiddenControls can be inherited, so its contents may be not significative + For Each sClass In Hiddens - If Classes.Exist(sClass) Then - ' check if key exists in Classes - If Classes.Exist(Key &/ sClass) Then - Classes[Key &/ sClass].InitControl() - iPos = Controls.Find(sClass) - If iPos >= 0 Then Controls.Remove(iPos) - Else - ' show it and continue - FMain.ShowWarning("Classes[" & Key &/ sClass & "]\n\n Not Exists !") - End If + If Classes.Exist(Key &/ sClass) Then + Classes[Key &/ sClass].InitControl() + iPos = Controls.Find(sClass) + If iPos >= 0 Then Controls.Remove(iPos) Endif Next