[DEVELOPMENT ENVIRONMENT]

* BUG: Fixed a bug which prevented to add an existing form to a project.
* BUG: Choosing a non-default stack size works correctly now.
* BUG: Somes fixes in autocompletion.
* NEW: Support for a new project option that tells the interpreter to 
  generate or not generate stack traces.


git-svn-id: svn://localhost/gambas/trunk@1134 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2008-03-04 23:15:16 +00:00
parent a077eaed8b
commit 30c9491a27
5 changed files with 53 additions and 21 deletions

View File

@ -1,5 +1,6 @@
[Breakpoints]
Count=0
Breakpoint[1]="Project.3396"
Count=1
[DebugWindow]
Count=0

View File

@ -292,6 +292,7 @@ PRIVATE SUB FillWithIdent(sWord AS String)
DIM sOrg AS String
DIM sText AS String
DIM iLine AS Integer
DIM sUCaseLine AS String
lvwComp.Clear
@ -326,12 +327,13 @@ PRIVATE SUB FillWithIdent(sWord AS String)
IF iLine < 0 THEN BREAK
IF iLine = hEditor.Line THEN CONTINUE
sLine = String.UCase(Highlight.Purge(hEditor.Lines[iLine]))
sLine = Highlight.Purge(hEditor.Lines[iLine])
sUCaseLine = UCase(sLine) ' Only ASCII characters are interesting there...
iPos = 0
DO
INC iPos
iPos = String.InStr(sLine, sWord, iPos)
iPos = String.InStr(sUCaseLine, sWord, iPos)
IF iPos = 0 THEN BREAK
IF iPos > 1 THEN
sCar = String.Mid$(sLine, iPos - 1, 1)
@ -341,7 +343,7 @@ PRIVATE SUB FillWithIdent(sWord AS String)
sCar = String.Mid$(sLine, iPos2, 1)
IF String.InStr(FEditor.IDENT_CAR, sCar) = 0 THEN BREAK
NEXT
sCar = String.Mid$(hEditor.Lines[iLine], iPos, iPos2 - iPos)
sCar = String.Mid$(sLine, iPos, iPos2 - iPos)
IF IsDigit(Left$(sCar)) THEN CONTINUE
IF cKey.Exist(sCar) THEN CONTINUE
aResult.Add(sCar & " 3")

View File

@ -79,6 +79,7 @@ PUBLIC SUB Form_Open()
txtTabSize.Value = .TabSize
cmbStackSize.Index = 0
IF .Stack THEN cmbStackSize.Text = .Stack & " K"
cmbStackTrace.Index = If(.StackTrace, 0, 1)
txtVersionProg.Text = .VersionProgram
'chkVersion.Value = NOT IsNull(.VersionProgram)
@ -188,6 +189,7 @@ PRIVATE FUNCTION DoApply() AS Boolean
ELSE
.Stack = Val(cmbStackSize.Text)
ENDIF
.StackTrace = cmbStackTrace.Index = 0
IF .ControlPublic <> (cmbControlPublic.Index = 0) OR IF .ModulePublic <> (cmbModulePublic.Index = 0) THEN
Project.ResetScan

View File

@ -1,23 +1,23 @@
# Gambas Form File 2.0
{ Form Form
MoveScaled(0.1429,2.4286,84,69)
MoveScaled(0.1429,2.4286,84,72)
Text = ("Project properties")
Icon = Picture["icon:/small/properties"]
Persistent = True
Border = Window.Fixed
{ btnOK Button
MoveScaled(54,65,14,3)
MoveScaled(54,68,14,3)
Text = ("OK")
Default = True
}
{ btnCancel Button
MoveScaled(69,65,14,3)
MoveScaled(69,68,14,3)
Text = ("Cancel")
Cancel = True
}
{ tabProject TabStrip
MoveScaled(1,1,82,63)
MoveScaled(1,1,82,66)
Count = 7
Index = 0
Text = ("General")
@ -46,7 +46,7 @@
Text = ("Author(s)")
}
{ txtAuthor TextArea
MoveScaled(1,43,79,15)
MoveScaled(1,43,79,17)
Text = ("")
Wrap = True
}
@ -114,7 +114,7 @@
Text = ("Execution")
}
{ Label16 Label
MoveScaled(1,46,79,3)
MoveScaled(1,49,79,3)
Font = Font["Bold"]
Text = ("Component")
}
@ -124,7 +124,7 @@
Text = ("Translation")
}
{ HBox5 HBox
MoveScaled(2,54,77,3)
MoveScaled(2,57,77,3)
Spacing = 8
{ Label26 Label
MoveScaled(0,0,39,3)
@ -139,7 +139,7 @@
}
}
{ HBox6 HBox
MoveScaled(2,50,77,3)
MoveScaled(2,53,77,3)
Spacing = 8
{ Label25 Label
MoveScaled(0,0,39,3)
@ -252,6 +252,20 @@
Text = ("space(s)")
}
}
{ HBox16 HBox
MoveScaled(2,45,77,3)
Spacing = 8
{ Label6 Label
MoveScaled(0,0,39,3)
Text = ("Generate stack trace")
}
{ cmbStackTrace ComboBox
MoveScaled(40,0,10,3)
Text = ("")
ReadOnly = True
List = [("Yes"), ("No")]
}
}
Index = 2
Text = ("Components")
{ chkShowBeta CheckBox
@ -264,10 +278,10 @@
Text = ("Show only components used in project")
}
{ lstComponent ListContainer
MoveScaled(1,5,79,49)
MoveScaled(1,5,79,52)
}
{ HBox14 HBox
MoveScaled(1,55,79,3)
MoveScaled(1,58,79,3)
{ btnHelp Button
MoveScaled(0,0,30,3)
Text = ("About &component...")
@ -286,7 +300,7 @@
Index = 3
Text = ("Environment")
{ VBox1 VBox
MoveScaled(1,1,79,57)
MoveScaled(1,1,79,60)
Spacing = 8
{ VBox2 VBox
MoveScaled(2,1,47,6)
@ -352,9 +366,9 @@
Index = 4
Text = ("Versioning")
{ panVersioning Panel
MoveScaled(1,1,79,58)
MoveScaled(1,1,79,57)
{ txtVerCtrlChange TextArea
MoveScaled(0,3,79,50)
MoveScaled(0,3,79,53)
Font = Font["Monospace"]
Text = ("")
ReadOnly = True
@ -366,7 +380,7 @@
}
}
{ HBox15 HBox
MoveScaled(1,55,79,3)
MoveScaled(1,58,79,3)
Spacing = 8
{ btnUpdate Button
MoveScaled(0,0,18,3)
@ -387,7 +401,7 @@
Index = 5
Text = ("Provides")
{ tvwControl GridView
MoveScaled(1,1,79,57)
MoveScaled(1,1,79,60)
Grid = False
Header = GridView.Horizontal
Scrollbar = Scroll.Vertical
@ -466,7 +480,7 @@
}
}
{ HBox4 HBox
MoveScaled(1,21,79,37)
MoveScaled(1,21,79,40)
Spacing = 8
{ VBox4 VBox
MoveScaled(1,1,59,35)

View File

@ -49,6 +49,7 @@ PUBLIC Language AS String
PUBLIC CreateComponent AS Boolean
PUBLIC ComponentState AS Integer
PUBLIC Stack AS Integer
PUBLIC StackTrace AS Boolean
PUBLIC Authors AS String
PUBLIC VersionProgram AS String
@ -1940,6 +1941,7 @@ PUBLIC SUB ReadProject()
Language = ""
VersionProgram = ""
Stack = 0
StackTrace = FALSE
WHILE NOT Eof(hFic)
@ -2079,6 +2081,9 @@ PUBLIC SUB ReadProject()
CASE "stack"
Stack = Val(sVal)
CASE "stacktrace"
StackTrace = Val(sVal) <> 0
END SELECT
WEND
@ -2134,6 +2139,7 @@ PUBLIC SUB WriteProject(OPTIONAL bComponentDoNotChange AS Boolean, OPTIONAL bMak
IF Title THEN PRINT #hFic, "Title="; Title
IF Startup THEN PRINT #hFic, "Startup="; Startup
IF Stack THEN PRINT #hFic, "Stack="; Stack
IF StackTrace THEN PRINT #hFic, "StackTrace=1"
IF Icon THEN PRINT #hFic, "Icon="; Icon
PRINT #hFic, "Version="; CStr(MajorVersion) & "." & CStr(MinorVersion) & "." & CStr(ReleaseVersion)
@ -3386,19 +3392,26 @@ PUBLIC FUNCTION GetIcon(sPath AS String, OPTIONAL iSize AS Integer) AS Picture
DIM sLig AS String
DIM hImage AS Image
DIM hPict AS Picture
DIM sIcon AS String
OPEN sPath &/ ".project" AS #hFile
WHILE NOT Eof(hFile)
LINE INPUT #hFile, sLig
IF Left$(sLig, 5) = "Icon=" THEN
sPath = sPath &/ Mid$(sLig, 6)
sIcon = Mid$(sLig, 6)
BREAK
ENDIF
WEND
CLOSE #hFile
IF sIcon THEN
sPath = sPath &/ sIcon
ELSE
sPath = "img/logo/new-logo-32.png"
ENDIF
IF iSize THEN
RETURN StretchIcon(sPath, iSize).Picture
ELSE