[DEVELOPMENT ENVIRONMENT]

* BUG: Fix the help browser for classes whose name begins with an 
  underscore.
* BUG: Fix project loading when there are breakpoints set on non-existing 
  classes.

[INTERPRETER]
* BUG: Fix the behaviour of Eval() when the expression cannot be compiled.
* BUG: Error.Text does not crash anymore when the error message is void.

[COMPILER]
* BUG: Fix the parser behaviour when a non-terminated string is located at 
  the end of the file.

[GB.EVAL]
* BUG: Fix the parser behaviour when a non-terminated string is located at 
  the end of the expression.

[GB.GTK]
* BUG: Fix the behaviour of Label with AutoResize set.

[GB.QT4]
* BUG: Fix the behaviour of Label with AutoResize set.


git-svn-id: svn://localhost/gambas/trunk@3178 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2010-09-04 13:21:11 +00:00
parent db8f9e57fc
commit 0a659f3a9d
18 changed files with 327 additions and 301 deletions

3
TODO
View File

@ -24,12 +24,13 @@ INTERPRETER
- Sorting two or more arrays at the same time.
- MOD with floats.
- Make the error information associated with the current stack frame.
- Collection.Copy().
- Timer.TimeLeft.
DEVELOPMENT ENVIRONMENT
- Bookmarks in editor.
- Manage Object properties in IDE.
- Put a language code in comments, and hide them as needed by the user.
- Make a visual control clipboard.
- Generates an index control->component to suggest components for missing controls.
- Be able to open a .tar.gz project, and compress it back when the project is closed.

View File

@ -385,7 +385,7 @@ msgstr ""
#: FConnectionEditor.class:411 FCreateFile.class:922 FFontChooser.class:79
#: FGotoLine.class:57 FList.class:331 FMain.class:1573 FMenu.class:1197
#: FNewConnection.class:573 FNewTable.class:159 FNewTranslation.class:64
#: FOpenProject.class:490 FPasteSpecial.class:273 FPropertyProject.class:258
#: FOpenProject.class:496 FPasteSpecial.class:273 FPropertyProject.class:258
#: FReportBorderChooser.class:213 FReportCoordChooser.class:120
#: FSelectExtraFile.class:72 FSelectIcon.class:268 FSnippet.class:136
#: FTableChooser.class:138 FText.class:100
@ -469,7 +469,7 @@ msgstr ""
#: FGotoLine.class:63 FHelpBrowser.class:341 FIconEditor.class:1396
#: FImportTable.class:38 FList.class:155 FMain.class:204
#: FMakeInstall.class:318 FMenu.class:1202 FNewConnection.class:317
#: FNewTable.class:165 FNewTranslation.class:70 FOpenProject.class:496
#: FNewTable.class:165 FNewTranslation.class:70 FOpenProject.class:502
#: FOption.class:593 FPasteSpecial.class:279 FPropertyProject.class:1017
#: FReportBorderChooser.class:207 FReportCoordChooser.class:114
#: FSave.class:118 FSearch.class:504 FSelectExtraFile.class:78
@ -619,7 +619,7 @@ msgid ""
"Do you really want to open another file?"
msgstr ""
#: FConflict.class:254 FOpenProject.class:402 Project.module:392
#: FConflict.class:254 FOpenProject.class:408 Project.module:392
msgid "Open"
msgstr ""
@ -1092,7 +1092,7 @@ msgstr ""
msgid "Title"
msgstr ""
#: FCreateProject.class:659 FOpenProject.class:480
#: FCreateProject.class:659 FOpenProject.class:491
msgid "Open in another window"
msgstr ""
@ -2846,19 +2846,19 @@ msgstr ""
msgid "New translation"
msgstr ""
#: FOpenProject.class:388
#: FOpenProject.class:394
msgid "Select a project"
msgstr ""
#: FOpenProject.class:448
#: FOpenProject.class:454
msgid "Recent"
msgstr ""
#: FOpenProject.class:456 FWelcome.class:528
#: FOpenProject.class:462 FWelcome.class:528
msgid "Sort by path"
msgstr ""
#: FOpenProject.class:465 FWelcome.class:52
#: FOpenProject.class:471 FWelcome.class:52
msgid "Examples"
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -1030,13 +1030,16 @@ End
Public Sub SetBreakpoint(sClass As String, iLine As Integer, bOn As Boolean)
Dim hEditor As FEditor
Dim sPath As String
'Debug sClass; "."; iLine;; bOn
If $iState = STATE_RUNNING Then Return
' Update editor
hEditor = Project.LoadFile(Project.FindPath(sClass))
sPath = Project.FindPath(sClass)
If Not sPath Then Return
Try hEditor = Project.LoadFile(sPath)
If Not hEditor Then Return
If hEditor.SetBreakpoint(iLine, bOn) Then Return

View File

@ -1,7 +1,7 @@
# Gambas Form File 3.0
{ Form Form
MoveScaled(0,2,71,74)
MoveScaled(0,2,83,74)
Background = Color.TextBackground
Foreground = Color.TextForeground
Text = ("Welcome to Gambas 3")

View File

@ -304,7 +304,7 @@ Public Sub GetSymbolURL(sComponent As String, sClass As String, Optional sSymbol
'If sComp = "gb.qt4" Or If sComp = "gb.gtk" Or If sComp = "gb.gui" Then sComp = "gb.qt"
'If sComp = "gb.qt4.ext" Then sComp = "gb.qt.ext"
sPath &/= LCase(sComp)
sPath &/= Replace(LCase(sClass), "_", ".")
sPath &/= LCase(Left(sClass) & Replace(Mid(sClass, 2), "_", "."))
If sSymbol Then
sName = LCase(sSymbol)

View File

@ -68,7 +68,6 @@ Public Sub btnOK_Click()
'Settings["/FOpenProject/Path"] = $sPath
'tabProject.Index = 0
lstRecent.Clear
InAnotherWindow = chkOther.Value
Me.Close(True)
@ -92,9 +91,8 @@ Public Sub Form_Open()
dchProject_Change
tabProject_Click
chkOther.Value = False
InAnotherWindow = False
chkOther.Visible = $bAnother
btnOther.Visible = $bAnother
chkSortRecent.Value = Settings["/FOpenProjet/SortRecent", False]
End
@ -358,3 +356,11 @@ Public Sub splProject_Resize()
panProjectTitle.H = $hProjectItem.IdealHeight + panProjectTitle.Padding * 2
End
Public Sub btnOther_Click()
InAnotherWindow = True
btnOK_Click
End

View File

@ -75,24 +75,24 @@
Index = 0
}
{ HBox1 HBox
MoveScaled(1,71,87,4)
MoveScaled(1,71,112,4)
Spacing = True
{ chkOther CheckBox
MoveScaled(1,0,43,4)
{ Panel1 Panel
MoveScaled(31,0,3,4)
Expand = True
}
{ btnOther Button
MoveScaled(49,0,27,4)
AutoResize = True
Text = ("Open in another window")
}
{ Panel1 Panel
MoveScaled(45,0,3,4)
Expand = True
}
{ btnOK Button
MoveScaled(48,0,15,4)
MoveScaled(78,0,15,4)
Text = ("OK")
Default = True
}
{ btnCancel Button
MoveScaled(65,0,15,4)
MoveScaled(95,0,15,4)
Text = ("Cancel")
Cancel = True
}

View File

@ -9,7 +9,7 @@ Component=gb.gui
Component=gb.form
Component=gb.settings
Authors="Benoît Minisini"
Environment="GB_GUI=gb.gtk"
Environment="GB_GUI=gb.qt4"
TabSize=2
Translate=1
Language=en

View File

@ -36,9 +36,9 @@ SearchComment=False
SearchString=True
[OpenFile]
Active=1
File[1]=".src/MMain.module:37.3"
File[2]=".src/DBusApplication.class:55.51"
Active=3
File[3]=".src/DBus.class:9.0"
File[4]=".src/DBusProxy.class:22.2"
File[5]=".src/DBusObject.class:360.2"

View File

@ -198,8 +198,15 @@ void gLabel::updateSize(bool adjust, bool noresize)
pango_layout_get_pixel_size(layout, &w, &h);
//fprintf(stderr, "gLabel::updateSize: %s (%d %d) -> (%d %d)\n", name(), width(), height(), w + fw * 2, h + fw * 2);
w += fw * 2;
h += fw * 2;
if ((align == ALIGN_CENTER || align == ALIGN_LEFT || align == ALIGN_NORMAL || align == ALIGN_RIGHT) && h < height())
h = height();
_locked = true;
resize(width(), h + fw * 2);
resize(w, h);
_locked = false;
}

View File

@ -281,12 +281,14 @@ void MyLabel::calcMinimumHeight(bool adjust)
br = fm.boundingRect(0, 0, QWIDGETSIZE_MAX, QWIDGETSIZE_MAX, alignment(), text());
nw = br.width();
nh = br.height();
if (alignment() & Qt::AlignVCenter && (nh + f * 2) < height())
nh = height() - f * 2;
}
w = nw + f * 2;
h = nh + f * 2;
if (alignment() & Qt::AlignVCenter && nh < height())
nh = height();
locked = true;
CWIDGET_resize(THIS, w, h);
locked = false;

View File

@ -836,7 +836,7 @@ static void add_string()
newline++;
else if (car == '"')
jump = FALSE;
else if (!isspace(car))
else if (!car || !isspace(car))
break;
}
else

View File

@ -59,7 +59,7 @@ static void get_subst(int np, char **str, int *len)
BEGIN_PROPERTY(CERROR_text)
if (ERROR_last.code)
if (ERROR_last.code && ERROR_last.msg)
{
if (EXEC_debug)
{

View File

@ -1839,7 +1839,6 @@ void EXEC_new(void)
void *object;
char *name = NULL;
char *cname = NULL;
char *save_name;
np = *PC & 0xFF;
event = np & CODE_NEW_EVENT;

View File

@ -41,6 +41,8 @@
#include "gbx_string.h"
//#define DEBUG_ME
#if DEBUG_STRING
#define DEBUG_ME
#endif
@ -130,8 +132,8 @@ static int _pool_count[POOL_SIZE] = { 0 };
#ifdef DEBUG_ME
#define alloc_string(_len) \
({ \
static STRING *alloc_string(_len) \
{ \
STRING *str; \
int size = REAL_SIZE((_len) + 1 + sizeof(STRING)); \
int pool = (size / SIZE_INC) - 1; \
@ -153,8 +155,8 @@ static int _pool_count[POOL_SIZE] = { 0 };
} \
str->len = (_len); \
str->ref = 1; \
str; \
})
return str; \
}
#else

View File

@ -233,7 +233,10 @@ void EVAL_string(char *expr)
EVAL.New((void **)(void *)&eval, expr, len);
if (EVAL.Compile(eval, FALSE))
{
GB_Error(eval->error);
goto _ERROR;
}
if (!EVAL.Run(eval, get_value))
goto _ERROR;
@ -275,7 +278,10 @@ void SUBR_eval(ushort code)
EVAL.New((void **)(void *)&eval, expr, len);
if (EVAL.Compile(eval, FALSE))
{
GB_Error(eval->error);
goto _ERROR;
}
if (!EVAL.Run(eval, get_value))
goto _ERROR;

View File

@ -934,7 +934,7 @@ static void add_string()
newline++;
else if (car == '"')
jump = FALSE;
else if (!isspace(car))
else if (!car || !isspace(car))
break;
}
else