[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
This commit is contained in:
Benoît Minisini 2012-08-08 19:36:15 +00:00
parent e46e481908
commit 143ce94b6a
2 changed files with 19 additions and 26 deletions

View file

@ -286,7 +286,7 @@ msgstr ""
msgid "OpenGL display" msgid "OpenGL display"
msgstr "" msgstr ""
#: CComponent.class:443 #: CComponent.class:444
msgid "Loading information on component &1..." msgid "Loading information on component &1..."
msgstr "" msgstr ""

View file

@ -425,6 +425,7 @@ Public Sub Load()
Dim sLig As String Dim sLig As String
Dim iPos As Integer Dim iPos As Integer
Dim hClass As CClassInfo Dim hClass As CClassInfo
Dim hParent As CClassInfo
Dim hSym As CSymbolInfo Dim hSym As CSymbolInfo
Dim hProp As CPropertyInfo Dim hProp As CPropertyInfo
Dim sParent As String Dim sParent As String
@ -601,37 +602,29 @@ Public Sub Load()
hSym = hClass.Symbols["_IsForm"] hSym = hClass.Symbols["_IsForm"]
If hSym And If hSym.Value Then 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"] hSym = hClass.Symbols["_HiddenControls"]
If hSym Then Hiddens = Split(hSym.Value, ",") If hSym Then Hiddens.Insert(Split(hSym.Value, ","))
Endif Endif
Next Next
' For Each sClass In Hiddens ' _HiddenControls can be inherited, so its contents may be not significative
' 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)
For Each sClass In Hiddens For Each sClass In Hiddens
If Classes.Exist(sClass) Then If Classes.Exist(Key &/ sClass) Then
' check if key exists in Classes Classes[Key &/ sClass].InitControl()
If Classes.Exist(Key &/ sClass) Then iPos = Controls.Find(sClass)
Classes[Key &/ sClass].InitControl() If iPos >= 0 Then Controls.Remove(iPos)
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
Endif Endif
Next Next