From 143ce94b6a9458375f29bb54f56ed3f0ab790530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Wed, 8 Aug 2012 19:36:15 +0000 Subject: [PATCH] [DEVELOPMENT ENVIRONMENT] * BUG: If a library or a component exports a form, then the special properties ('_IsForm' and '_HiddenControls') are not taken into account. git-svn-id: svn://localhost/gambas/trunk@5019 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- app/src/gambas3/.lang/.pot | 2 +- .../gambas3/.src/Component/CComponent.class | 43 ++++++++----------- 2 files changed, 19 insertions(+), 26 deletions(-) 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