Package: wxglade
Version: 0.7.2-2
Severity: important

Hi,

The C++ generation produces code that doesn't compile when there is ID
generation:

$ cat test.wxg
<?xml version="1.0"?>
<!-- generated by wxGlade 0.7.2 on Sat Jan 28 22:15:21 2017 -->

<application class="" encoding="UTF-8" for_version="3.0" header_extension=".h" 
indent_amount="4" indent_symbol="space" is_template="0" language="python" 
name="" option="0" overwrite="1" path="wxglade_out.py" source_extension=".cpp" 
top_window="frame_1" use_gettext="1" use_new_namespace="1">
    <object class="MyFrame" name="frame_1" base="EditFrame">
        <title>frame_1</title>
        <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
            <orient>wxVERTICAL</orient>
            <object class="sizeritem">
                <border>0</border>
                <option>0</option>
                <object class="wxButton" name="button_1" base="EditButton">
                    <label>button_1</label>
                    <id>mybutton=?</id>
                </object>
            </object>
        </object>
    </object>
</application>

$ python /usr/share/wxglade/wxglade.py -g C++ test.wxg -o test.cpp
INFO    : Starting wxGlade version "0.7.2" on Python 2.7.13
INFO    : Base directory:             /usr/share/wxglade
INFO    : Documentation directory:    /usr/share/wxglade/docs
INFO    : Icons directory:            /usr/share/wxglade/icons
INFO    : Build-in widgets directory: /usr/share/wxglade/widgets
INFO    : Template directory:         /usr/share/wxglade/templates
INFO    : Credits file:               /usr/share/wxglade/CREDITS.txt
INFO    : License file:               /usr/share/wxglade/LICENSE.txt
INFO    : Manual file:                /usr/share/wxglade/docs/html/index.html
INFO    : Tutorial file:              /usr/share/wxglade/docs/tutorial.html
INFO    : Home directory:             /home/me
INFO    : Application data directory: /home/me/.wxglade
INFO    : Configuration file:         /home/me/.wxglade/wxgladerc
INFO    : History file:               /home/me/.wxglade/file_history.txt
INFO    : Log file:                   /home/me/.wxglade/wxglade.log
INFO    : Current locale settings are:
INFO    :   Language code: fr_FR
INFO    :   Encoding: UTF-8
INFO    :   Filesystem encoding: UTF-8
INFO    : Module custom_widget.wconfig not found.
INFO    : Module menubar.wconfig not found.
INFO    : Module spacer.wconfig not found.
INFO    : Load code generators:
INFO    : Module calendar_ctrl.lisp_codegen not found.
INFO    : Module generic_calendar_ctrl.lisp_codegen not found.
INFO    : Load sizer generators:

$ g++ -c -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 
-I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__  test.cpp
test.cpp: In constructor ‘MyFrame::MyFrame(wxWindow*, wxWindowID, const 
wxString&, const wxPoint&, const wxSize&, long int)’:
test.cpp:23:31: error: lvalue required as left operand of assignment
     mybutton = wxID_HIGHEST + 1000    button_1 = new wxButton(this, mybutton, 
_("button_1"));
                               ^~~~

AFAICS this is fixed in the development (f172c83ff51d) version of wxGlade.

Cheers!
Sylvain

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
    APT policy: (500, 'testing'), (50, 'unstable'), (1, 'experimental')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages wxglade depends on:
ii  python           2.7.13-1
ii  python-wxgtk3.0  3.0.2.0+dfsg-3

wxglade recommends no packages.

wxglade suggests no packages.

-- no debconf information

Reply via email to