From bd15563f2fd0652be0f733f589b4e6ff7d3b3a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Mon, 24 Aug 2009 23:30:23 +0000 Subject: [PATCH] [DEVELOPMENT ENVIRONMENT] * NEW: Double-click is needed to modify a value in the debugger. But now you can't reset an object value to NULL. Something to fix later... [GB.DEBUG] * BUG: Fix an uninitialized value that made the debugger crash when trying to see if an object can act like an array. [GB.PDF] * BUG: Make gb.pdf compile with poppler >= 0.11.3. git-svn-id: svn://localhost/gambas/trunk@2268 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- app/src/gambas3/.project | 2 +- app/src/gambas3/.src/Debug/FDebugExpr.class | 67 +++++++++++---------- app/src/gambas3/.src/Debug/FDebugInfo.class | 24 ++------ gb.opengl/src/GLselectFeedback.c | 4 +- gb.pdf/configure.ac | 2 + gb.pdf/src/CPdfDocument.cpp | 11 ++-- main/lib/debug/print.c | 2 +- 7 files changed, 52 insertions(+), 60 deletions(-) diff --git a/app/src/gambas3/.project b/app/src/gambas3/.project index 11d63b768..7d901f52d 100644 --- a/app/src/gambas3/.project +++ b/app/src/gambas3/.project @@ -1,5 +1,5 @@ # Gambas Project File 3.0 -# Compiled with Gambas 2.99.0 (r2258) +# Compiled with Gambas 2.99.0 (r2267) Title=Gambas 3 Startup=Project StackTrace=1 diff --git a/app/src/gambas3/.src/Debug/FDebugExpr.class b/app/src/gambas3/.src/Debug/FDebugExpr.class index 77141aec9..962bdab95 100644 --- a/app/src/gambas3/.src/Debug/FDebugExpr.class +++ b/app/src/gambas3/.src/Debug/FDebugExpr.class @@ -236,29 +236,43 @@ Public Sub gvwExpr_Activate() Dim sText As String Dim sVal As String Dim sExpr As String - + Dim sSym As String + If gvwExpr.Row >= 0 Then - sText = gvwExpr[gvwExpr.Row, 0].Text - If Not sText Or Right(sText) = ":" Then Return - sVal = gvwExpr[gvwExpr.Row, 1].Text - 'If Left(sVal) <> "(" Then Return + If Not $bArray And If Not $bCollection Then + sSym = $aSym[gvwExpr.Row] + If Left(sSym) = ":" Then Return + Endif - If $bArray Or $bCollection - sText = $sExpr & "[" & sText & "]" - Else - If Left($sClass) = "." Or If Not $sRealClass Then - sText = $sExpr & "." & sText - Else - 'sText = $sExpr & "." & sText - sText = $sRealClass & "(" & $sExpr & ")." & sText - Endif - Endif + sText = gvwExpr[gvwExpr.Row, 0].Text + If Not sText Then Return + sVal = gvwExpr[gvwExpr.Row, 1].Text - With gvwExpr[gvwExpr.Row, 1] - Design.SetBalloon(gvwExpr, .X + .W / 2, .Y + .H / 2) - End With - OpenExpr(sText) + If Left(sVal) = "(" Then + + If $bArray Or $bCollection + sText = $sExpr & "[" & sText & "]" + Else + If Left($sClass) = "." Or If Not $sRealClass Then + sText = $sExpr & "." & sText + Else + 'sText = $sExpr & "." & sText + sText = $sRealClass & "(" & $sExpr & ")." & sText + Endif + Endif + + With gvwExpr[gvwExpr.Row, 1] + Design.SetBalloon(gvwExpr, .X + .W / 2, .Y + .H / 2) + End With + OpenExpr(sText) + + Else + + gvwExpr.Column = 1 + gvwExpr.Edit + + Endif Endif @@ -403,6 +417,7 @@ Private Sub Init(sInfo As String, bNew As Boolean) As Boolean With gvwExpr .Columns.Count = 2 + If nRow > 1024 Then Stop .Rows.Count = nRow If $bArray Then @@ -684,20 +699,6 @@ Public Sub gvwExpr_Scroll() End -Public Sub gvwExpr_Click() - - Dim sSym As String - - If gvwExpr.Column = 1 Then - If Not $bArray And If Not $bCollection Then - sSym = $aSym[gvwExpr.Row] - If Left(sSym) = ":" Then Return - Endif - gvwExpr.Edit - Endif - -End - Public Sub gvwExpr_Save(Row As Integer, Column As Integer, Value As String) Dim sSym As String diff --git a/app/src/gambas3/.src/Debug/FDebugInfo.class b/app/src/gambas3/.src/Debug/FDebugInfo.class index 39f7f1524..af0046660 100644 --- a/app/src/gambas3/.src/Debug/FDebugInfo.class +++ b/app/src/gambas3/.src/Debug/FDebugInfo.class @@ -648,8 +648,12 @@ Public Sub tbvLocal_Activate() Dim sVal As String = hTable[hTable.Row, 1].Text If Right(sExpr) = ":" Then Return - If Left(sVal) <> "(" Then Return - Design.Command("#X" & sExpr & "\t" & sExpr) + If Left(sVal) = "(" Then + Design.Command("#X" & sExpr & "\t" & sExpr) + Else + hTable.Column = 1 + hTable.Edit + Endif End @@ -871,7 +875,6 @@ Public Sub tbvLocal_Data(Row As Integer, Column As Integer) If Right(sVar) = ":" Then .Font.Bold = True .Font.Underline = True - Debug sVar .Text = If(UCase(sVar) = "S:", ("Static variables"), ("Dynamic variables")) Else .Text = sVar @@ -890,21 +893,6 @@ Public Sub tbvObject_Data(Row As Integer, Column As Integer) End -Public Sub tbvLocal_Click() - - Dim hView As TableView = Last - If hView.Column = 1 Then - If Right(hView[hView.Row, 0].Text) <> ":" Then hView.Edit - Endif - -End - -Public Sub tbvObject_Click() - - tbvLocal_Click - -End - Public Sub tbvLocal_Save(Row As Integer, Column As Integer, Value As String) Dim sVar As String = tbvLocal[Row, 0].Text diff --git a/gb.opengl/src/GLselectFeedback.c b/gb.opengl/src/GLselectFeedback.c index 48831ee26..e89c8e072 100644 --- a/gb.opengl/src/GLselectFeedback.c +++ b/gb.opengl/src/GLselectFeedback.c @@ -108,8 +108,8 @@ BEGIN_METHOD(GLRENDERMODE, GB_INTEGER Mode) GLuint *hitbuffer = selectbuffer; int idxhit, idxname; - //GB.New(&hitArray, GB_T_OBJECT, result); - GB.New(POINTER(&hitArray), GB.FindClass("Integer[][]"), NULL, NULL); + GB.Array.New(&hitArray, GB.FindClass("Integer[]"), result); + //GB.New(POINTER(&hitArray), GB.FindClass("Integer[][]"), NULL, NULL); for (idxhit=0; idxhit < result; idxhit++) { diff --git a/gb.pdf/configure.ac b/gb.pdf/configure.ac index 914cd99b8..231667830 100644 --- a/gb.pdf/configure.ac +++ b/gb.pdf/configure.ac @@ -20,6 +20,8 @@ if test "$have_poppler" = "yes"; then AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_6, $((1-$?)), Poppler version >= 0.6) pkg-config --atleast-version=0.8.0 poppler AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_8, $((1-$?)), Poppler version >= 0.8) + pkg-config --atleast-version=0.11.3 poppler + AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_11_3, $((1-$?)), Poppler version >= 0.11.3) fi AC_OUTPUT( \ diff --git a/gb.pdf/src/CPdfDocument.cpp b/gb.pdf/src/CPdfDocument.cpp index cee8b83ee..1a7034e59 100644 --- a/gb.pdf/src/CPdfDocument.cpp +++ b/gb.pdf/src/CPdfDocument.cpp @@ -504,12 +504,13 @@ END_PROPERTY BEGIN_PROPERTY(PDFINFO_format) - char *ctx=NULL; - - GB.Alloc(POINTER(&ctx),16*sizeof(char)); - snprintf(ctx,16*sizeof(char),"%.2g",THIS->doc->getPDFVersion()); + char ctx[16]; + #if POPPLER_VERSION_0_11_3 + snprintf(ctx, sizeof(ctx), "%.2g", THIS->doc->getPDFMajorVersion () + THIS->doc->getPDFMinorVersion() / 10.0); + #else + snprintf(ctx, sizeof(ctx), "%.2g", THIS->doc->getPDFVersion()); + #endif GB.ReturnNewZeroString(ctx); - GB.Free(POINTER(&ctx)); END_PROPERTY diff --git a/main/lib/debug/print.c b/main/lib/debug/print.c index 6feca8e41..792ce0834 100644 --- a/main/lib/debug/print.c +++ b/main/lib/debug/print.c @@ -312,7 +312,7 @@ void PRINT_object(FILE *where, VALUE *value) VALUE conv; void *object; int i, index; - int count; + int count = 0; CLASS *class, *real_class; CLASS_DESC_SYMBOL *cd; char *key;