Code::Blocks Forums

User forums => Nightly builds => Topic started by: killerbot on January 03, 2007, 08:01:47 pm

Title: The 03 january 2007 build is out.
Post by: killerbot on January 03, 2007, 08:01:47 pm
Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

A link to the unicode windows wxWidget dll for Code::Blocks : http://prdownload.berlios.de/codeblocks/wxmsw26u_gcc_cb_wx2.6.3p2.7z

To fix the menu alignment bug introduced in wx 2.6.3 [windows only bug] we have patched wx ourselves, and that results in the following alternative dll : http://prdownload.berlios.de/codeblocks/wxmsw26u_gcc_cb_wx2.6.3p2AndCbPatch.7z

For those who might need this one (when no MingW installed on your system) : the mingw10m.dll : http://prdownload.berlios.de/codeblocks/mingwm10.7z

For support of ansi builds, a link to the ansi windows wxWidget dll for Code::Blocks : http://prdownload.berlios.de/codeblocks/wxmsw26_gcc_cb_wx2.6.3p2.7z

The 03 January 2007 build is out.
  - Windows : http://prdownload.berlios.de/codeblocks/CB_20070103_rev3455_win32.7z
  - Linux :
         http://prdownload.berlios.de/codeblocks/CB_20070103_rev3455_Ubuntu6.06.deb
         http://prdownload.berlios.de/codeblocks/CB_20070103_rev3455_suse100+101.i586.rpm (not yet)
         http://prdownload.berlios.de/codeblocks/CB_20070103_rev3455_fc4+5.i586.rpm (not yet)


Resolved Fixed:


Regressions/Confirmed/Annoying/Common bugs:


Title: Re: The 03 january 2007 build is out.
Post by: artoj on January 03, 2007, 08:18:24 pm
Quote
  • Code snippets 0.3:
    * Added Edit snippet dialog
    * Added macro functionality similar to editor's autocomplete
    * The images are now correctly loaded when using the plugin from the user's plugin directory


Just little comments or maybe I should give better commit messages next time. The macro system similarity is that you can insert $(name-here) types of macros. Also, the snippet is run through MacroManager so you can use the predefined variables found in the Wiki too.

Quote
  • Code snippets 0.3.1:
    * Improved accessibility in Edit snippet dialog
    * Added snippet tool tips; disabled by default in wxWidgets 2.6. Windows only (limitations in wxWidgets)


You might wonder why the tool tips are disabled on wxWidgets 2.6. There's actually comment in the OnItemGetToolTip which is informative about the issue:

Code
// "My eyes! The goggles do nothing!"

Seriously speaking, the tool tips in wxWidgets 2.6 ignore line breaks and produce garbage to the text which will render the tool tip useless. wxWidgets 2.8 shows the tool tips correctly; only on Windows of course.

I actually had to create a Known Issues (http://wiki.codeblocks.org/index.php?title=Code_Snippets_plugin#Known_Issues) section to the Code snippet wiki page because the faults I found in the Edit snippet dialog / these updates, most of the being bugs in wxWidgets.

* goes to create minimal examples for bug reports *
Title: Re: The 03 january 2007 build is out.
Post by: pitti platsch on January 03, 2007, 09:38:46 pm
When will you fix the bug that one cannot debug a DLL on Windows? This bug is in Code::Blocks since 03 november 2006 build. :(
I can imagine that you work a lot, but this is very important and easy to fix (as mentioned in the 3nov2006-build thread).

greets
pitti
Title: Re: The 03 january 2007 build is out.
Post by: killerbot on January 03, 2007, 09:52:05 pm
this is the 03 nov thread : http://forums.codeblocks.org/index.php?topic=4368.0
@Yiannis, I think we have a patch for this at berlios, could you have a look at it. If it is the one I have in mind, well then GDB 5.x support will be gone [well we used to tell we don't have 5.x support, recently we did have, maybe it's time again to not have ;-)  ]

edit : this is the patch : not sure if it's the same problem, but worth looking at I guess : [ Patch #1658 ] Corrects the "No source file named" behavior when debugging : https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1658&group_id=5358

the introduction of
Code
 else
          {
                  // for foreign files, we still should use a relative path
  wxFileName f(filename);
                  f.MakeRelativeTo(prj->GetBasePath());
                  fname = f.GetFullPath();
          }
cause the user who reported this to have the problem, but tiwag came up with another example where commenting out the above section doesn't help at all.

The mentioned patch does this in that particular area :
Code
         else
         {
-        // for foreign files, we still should use a relative path
+        // for foreign files, we should use an absolute path
          wxFileName f(filename);
-        f.MakeRelativeTo(prj->GetBasePath());
+        f.MakeAbsolute();
          fname = f.GetFullPath();
+        fname.Replace(_T("\\"), _T("/"));
         }
together with :
Code
--- plugins/debuggergdb/gdb_driver.cpp	(revision 3258)
+++ plugins/debuggergdb/gdb_driver.cpp (working copy)
@@ -22,7 +22,7 @@
 static wxRegEx reThreadSwitch(_T("^\\[Switching to thread .*\\]#0[ \t]+(0x[A-z0-9]+) in (.*) from (.*)"));
 static wxRegEx reThreadSwitch2(_T("^\\[Switching to thread .*\\]#0[ \t]+(0x[A-z0-9]+) in (.*) from (.*):([0-9]+)"));
 #ifdef __WXMSW__
-    static wxRegEx reBreak(_T("([A-z]:)([^:]+):([0-9]+):[0-9]+:[begmidl]+:(0x[0-9A-z]+)"));
+    static wxRegEx reBreak(_T("..([A-z]:)([^:]+):([0-9]+):[0-9]+:[begmidl]+:(0x[0-9A-z]+)"));
 #else
     static wxRegEx reBreak(_T("\032\032([^:]+):([0-9]+):[0-9]+:[begmidl]+:(0x[0-9A-z]+)"));
 #endif
@@ -130,6 +130,7 @@
     wxString cmd;
     cmd << debugger;
     cmd << _T(" -nx");          // don't run .gdbinit
+    cmd << _T(" -readnow ");    // read symbol table immediately
     cmd << _T(" -fullname ");   // report full-path filenames when breaking
     cmd << _T(" -quiet");       // don't display version on startup
     cmd << _T(" -args ") << debuggee;
@@ -141,6 +142,7 @@
     wxString cmd;
     cmd << debugger;
     cmd << _T(" -nx");          // don't run .gdbinit
+    cmd << _T(" -readnow ");    // read symbol table immediately
     cmd << _T(" -fullname ");   // report full-path filenames when breaking
     cmd << _T(" -quiet");       // don't display version on startup
     cmd << _T(" -pid=") << wxString::Format(_T("%d"), pid);

@tiwag : if you have a spare moment could you check if your example works correct with the above mentioned patch ?
Title: Re: The 03 january 2007 build is out.
Post by: Jan van den Borst on January 03, 2007, 10:21:00 pm
Hi All
I have a question regarding the Code snippets plugin.
I want to make a snippet inserting a file header:
<----snippet code----->
//******************************************************************************
//* Copyright (c) 2007
//******************************************************************************
//*
//* FILE:              [[ print(GetEditorManager().GetActiveEditor().GetShortName()); ]]
//*
//* AUTHOR:        Jan van den Borst
//*
//* DESCRIPTION:
//*
//* FILE ID: $$Id:$
//*
//******************************************************************************
<----snippet code----->

This snippet works well, but the hard spaces in the code are not saved in the xml file. If I modify this file by hand and put &#x20; the hard spaces are preserved but editing the snippet by the gui makes the hard spaces disappear again.
Any ideas hoe to solve this?
Title: Re: The 03 january 2007 build is out.
Post by: cstudent on January 03, 2007, 10:22:14 pm
Ubuntu 6.10 (Edgy) build here (http://www.savefile.com/projects/1037211).
Title: Re: The 03 january 2007 build is out.
Post by: killerbot on January 03, 2007, 10:41:47 pm
Hi All
I have a question regarding the Code snippets plugin.
I want to make a snippet inserting a file header:
<----snippet code----->
//******************************************************************************
//* Copyright (c) 2007
//******************************************************************************
//*
//* FILE:              [[ print(GetEditorManager().GetActiveEditor().GetShortName()); ]]
//*
//* AUTHOR:        Jan van den Borst
//*
//* DESCRIPTION:
//*
//* FILE ID: $$Id:$
//*
//******************************************************************************
<----snippet code----->

This snippet works well, but the hard spaces in the code are not saved in the xml file. If I modify this file by hand and put &#x20; the hard spaces are preserved but editing the snippet by the gui makes the hard spaces disappear again.
Any ideas hoe to solve this?


maybe because of tinyxml ?? use CDATA ??
Title: Re: The 03 january 2007 build is out.
Post by: artoj on January 03, 2007, 10:45:34 pm
This snippet works well, but the hard spaces in the code are not saved in the xml file. If I modify this file by hand and put &#x20; the hard spaces are preserved but editing the snippet by the gui makes the hard spaces disappear again.

Hopefully fixed in next nightly; the fix is: http://www.grinninglizard.com/tinyxmldocs/classTiXmlBase.html#e0 (http://www.grinninglizard.com/tinyxmldocs/classTiXmlBase.html#e0)
Title: Re: The 03 january 2007 build is out.
Post by: killerbot on January 03, 2007, 11:03:16 pm
TiXmlPrinter is also very handy !
Title: Re: The 03 january 2007 build is out.
Post by: mandrav on January 03, 2007, 11:15:11 pm
This snippet works well, but the hard spaces in the code are not saved in the xml file. If I modify this file by hand and put the hard spaces are preserved but editing the snippet by the gui makes the hard spaces disappear again.

Hopefully fixed in next nightly; the fix is: http://www.grinninglizard.com/tinyxmldocs/classTiXmlBase.html#e0 (http://www.grinninglizard.com/tinyxmldocs/classTiXmlBase.html#e0)

arto, you really should use CDATA for the snippets. The reason is simple: one special character in the snippet and the whole snippets xml file will become unreadable.
Title: Re: The 03 january 2007 build is out.
Post by: artoj on January 04, 2007, 12:04:55 pm
arto, you really should use CDATA for the snippets. The reason is simple: one special character in the snippet and the whole snippets xml file will become unreadable.

I'm not exactly following you, which special characters will break the XML file when used from the GUI? I can use !"#¤%&/()=?`´@£$^¨åäö*'~<> without any problems. :?:
Title: Re: The 03 january 2007 build is out.
Post by: mandrav on January 04, 2007, 01:10:13 pm
arto, you really should use CDATA for the snippets. The reason is simple: one special character in the snippet and the whole snippets xml file will become unreadable.

I'm not exactly following you, which special characters will break the XML file when used from the GUI? I can use !"#¤%&/()=?`´@£$^¨åäö*'~<> without any problems. :?:

I admit I haven't looked at your code and you might very well handle the special characters yourself. But this wouldn't be needed if you just used CDATA. All formatting would be preserved and you wouldn't have to worry about special chars.

And yes, I 'm talking about <> and others...

Anyway, this was just a suggestion.
Title: Re: The 03 january 2007 build is out.
Post by: artoj on January 04, 2007, 02:08:41 pm
I admit I haven't looked at your code and you might very well handle the special characters yourself. But this wouldn't be needed if you just used CDATA. All formatting would be preserved and you wouldn't have to worry about special chars.

TinyXML escapes the special characters I mentioned automatically. The whitespace was the only problem with formatting and it's now (soon) fixed. Tabs for example were handled correctly before.

EDIT: However, I've taken your warning about data loss seriously and the codesnippets.xml is now backupped if it's not valid XML. While in normal case creating an invalid XML should never happen (TinyXML does all the XML job), manually editing the file might led to it.
Title: Re: The 03 january 2007 build is out.
Post by: thomas on January 04, 2007, 02:53:16 pm
Arto, you may really want to listen to Yiannis :) Seriously, we've tried it all before with the config file.

I kept telling the Chinese guys over and over again: "But it works! It must! TinyXML escapes illegal chars". However, it turned out that after we used CDATA, it would mysteriously work for everybody when it would not before. Nobody has ever been complaining again.
The "bugfix" - if you want to call it that - is one additional line of code, so it's really not a big pain.
Title: Re: The 03 january 2007 build is out.
Post by: artoj on January 04, 2007, 05:55:06 pm
However, it turned out that after we used CDATA, it would mysteriously work for everybody when it would not before. Nobody has ever been complaining again.

Not good enough, if there's really a bug, it needs to be fixed.

Did you notify the TinyXML developers about the issue?
Title: Re: The 03 january 2007 build is out.
Post by: lubos on January 04, 2007, 07:06:41 pm
when i use split view there's no code highlight in second window, is this ok? im using winxp sp2
Title: Re: The 03 january 2007 build is out.
Post by: sethjackson on January 04, 2007, 07:09:45 pm
when i use split view there's no code highlight in second window, is this ok? im using winxp sp2

No it is not. There is a bug report for it at BerliOS.....
Title: Re: The 03 january 2007 build is out.
Post by: thomas on January 05, 2007, 09:09:43 am
Not good enough, if there's really a bug, it needs to be fixed.

Did you notify the TinyXML developers about the issue?
No, because I am not sure that what I was doing (and what you're doing) is actually legal in XML. It could very well be that TinyXML is right...
Title: Re: The 03 january 2007 build is out.
Post by: artoj on January 05, 2007, 10:29:11 am
No, because I am not sure that what I was doing (and what you're doing) is actually legal in XML. It could very well be that TinyXML is right...

In Wikipedia (http://en.wikipedia.org/wiki/CDATA) it says:

Quote
A CDATA section is merely an alternative syntax for expressing character data; there is no semantic difference between character data that manifests as a CDATA section and character data that manifests as in the usual syntax in which "<" and "&" would be represented by "&lt;" and "&amp;", respectively.

There is of course the XML specification (http://www.w3.org/TR/2004/REC-xml-20040204/), Character data and markup (http://www.w3.org/TR/2004/REC-xml-20040204/#dt-chardata)

Quote
In the content of elements, character data is any string of characters which does not contain the start-delimiter of any markup and does not include the CDATA-section-close delimiter, "]]>". In a CDATA section, character data is any string of characters not including the CDATA-section-close delimiter, "]]>".

Are you sure they had problems with Chinese characters and not Japanese? From the TinyXML homepage:

Quote
For example, Japanese systems traditionally use SHIFT-JIS encoding. Text encoded as SHIFT-JIS can not be read by TinyXML. A good text editor can import SHIFT-JIS and then save as UTF-8.

But why would it then succeed in CDATA, no idea.