[Gambas-user] Issue 299 in gambas: IDE: CComponent logic and libraries that export forms

gambas at ...2524... gambas at ...2524...
Tue Aug 7 00:50:27 CEST 2012


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 299 by adamn... at ...626...: IDE: CComponent logic and libraries  
that export forms
http://code.google.com/p/gambas/issues/detail?id=299

1) Describe the problem.
(Welcome back Benoit, hope the holiday was enjoyable.)

If a project is a library and it has a form that is exported the IDE cannot  
open the project.  It provides an error pointing at line 612 of CComponent:
   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
I have stepped through the code with the debugger and the error is raised  
when the Key is "$".
I have hacked up a work around as follows:
   For Each sClass In Hiddens
     If Classes.Exist(sClass) Then
       If Key <> "$" Then
         Classes[Key &/ sClass].InitControl()
         iPos = Controls.Find(sClass)
         If iPos >= 0 Then Controls.Remove(iPos)
       Endif
     Endif
   Next
but I don't believe that to be a true fix.

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):

Version: TRUNK
Revision: r5004
Operating system: Linux
Distribution: PCLinuxOS
Architecture: x86
GUI component: QT4
Desktop used: LXDE

3) Provide a little project that reproduces the bug or the crash.
Attached

4) If your project needs a database, try to provide it, or part of it.
N/A

5) Explain clearly how to reproduce the bug or the crash.
Just try to open the project in the IDE

6) By doing that carefully, you have done 50% of the bug fix job!

IMPORTANT NOTE: if you encounter several different problems or bugs, (for
example, a bug in your project, and an interpreter crash while debugging
it), please create distinct issues!


Attachments:
	aslibrary1-0.0.1.tar.gz  4.7 KB





More information about the User mailing list