In 'src/codegen/codewriter.cpp' line endings that the codewriter is using are set according to the operating system.
When Mac OS is detected the line endings are set to \r, which is not correct anymore for newer versions of Mac OS.
Mac OS used to be using CR(\r) as line ending but more recent versions (OS X) are using linefeeds(\n) for new lines.
The outputted code by wxFormBuilder is therefor not displayed correctly in other editors or mergetools which makes the code output difficult to work with in OSX.
This post was created by me. Sorry for not loging in first.
Just ran version 3.3.4-beta, the problem is present and severe.
The generated code is unusable.
I doubt anybody wants to run wxFormBuilder on Macs that are so ancient that they still use \r line endings. It probably won't even compile for them.
It is therefore perfectly safe to change line endings to \n when running on a Mac.
This bug is almost open for 2 years by now. ;)
Please fix it or make it configurable.
The mac2unix utility has earn some holidays. :)
Just remove the WXMAC section from this function found in codewriter.cpp:
void CodeWriter::WriteLn( wxString code, bool keepIndents )
{
// It will not be allowed newlines (carry return) inside "code"
// If there was anyone, then FixWrite gets the string and breaks it
// in different lines, inserting them one after another using WriteLn
if ( !StringOk( code ) )
{
FixWrite( code, keepIndents);
}
else
{
if(keepIndents)
{
m_cols = m_indent;
}
}
Fixed in wxFB 3.5.1-RC1.