Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Categories and file types defined lost on C::B restart

<< < (2/4) > >>

280Z28:
That patch doesn't work for the unicode version. Look at the diff between what you just did for this and how it was changed here:

http://sourceforge.net/tracker/index.php?func=detail&aid=1385378&group_id=126998&atid=707418

Keep that style in mind because it consistently breaks the Unicode builds.

Another example of the exact same problem and how it was fixed:
http://sourceforge.net/tracker/index.php?func=detail&aid=1386025&group_id=126998&atid=707418

I'm not sure why it occurs, but I found a sure way to prevent it in the future. :)

thomas:
Hmm... yes, Printf does have a problem, that is the cause of the Cv1 bug too. If only I knew what it is.
Using operator<< is no real alternative, it works in this case, but not in all. I'll apply your patch tonight (thanks for pointing that out), but we must really find out how to use Printf correctly, so we can do things like Printf("blah blah %d blah %s", someInt someString), and it still works in Unicode, too. Maybe it is as simple as writing %S or %sL instead of %s -- don't know. I was unable to find any kind of useful documentation on this.

killerbot:
how come we cant make operator << work in all occasions, we could define overloads for the missing parts ??

personal note : die printf die  8)

thomas:
Hmm... tell me... how did you make this patch?

I just looked at it and wondered that it was apparently already applied. But that is not the case!

Your patch file says it is against revision 1563, but the file uses operator<< since revision 1340 (the path was modified in 1557).

Revision 1563 is well after 1557, so how can this be? Where do you take that Printf from?


--- Code: ---D:\desktop>svn diff -r1556:HEAD svn://svn.berlios.de/codeblocks/trunk/src/sdk/filegroupsandmasks.cpp
Index: filegroupsandmasks.cpp
===================================================================
--- filegroupsandmasks.cpp      (revision 1556)
+++ filegroupsandmasks.cpp      (revision 1578)
@@ -72,10 +72,10 @@
        {
         FileGroups* fg = m_Groups[i];
         wxString key;
-        key << _("group") << i << _T("/") << _T("name");
+        key << _("/file_groups/group") << i << _T("/") << _T("name");
                conf->Write(key, fg->groupName);
         key.Clear();
-        key << _("group") << i << _T("/") << _T("mask");
+        key << _("/file_groups/group") << i << _T("/") << _T("mask");
                conf->Write(key, GetStringFromArray(fg->fileMasks, _T(";")));
        }
 }
--- End code ---

thomas:

--- Quote from: killerbot on December 21, 2005, 09:39:42 pm ---how come we cant make operator << work in all occasions, we could define overloads for the missing parts ??
--- End quote ---
Oh, we can... but it is tedious. append() works fine too (with strings only , of course).
It is just Printf that seems to cause problems. Everywhere it is used, something screws up.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version