Hi, I'm getting an error when compiling wxPython-2.3.4.2 vs
wxGTK-2.3.4. I didn't see this in the archive:
···
------------------
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -fpic -g -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1
-Isrc -I/usr/include/python2.0 -c src/gtk/events.cpp -o build/temp.linux-i686-2.0/src/gtk/events.o
-I/usr/X11R6/lib/wx/include/gtkd-2.3 -I/usr/X11R6/include -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_B
ITS=64 -D_LARGE_FILES -I/usr/X11R6/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -
I/usr/X11R6/include -UNDEBUG -g -O0
src/gtk/misc2.cpp: In function `struct PyObject * _wrap_wxSafeYield(PyObject *, PyObject *, PyObject
*)':
/usr/X11R6/include/wx/utils.h:373: too many arguments to function `bool wxSafeYield(wxWindow * = 0)'
src/gtk/misc2.cpp:1524: at this point in file
error: command 'gcc' failed with exit status 1
-------------------
I'm compiling vs. my installed version of wxGTK, not the bundled
version - is that bad/unsupported? (I was previously using 2.3.2.1, so
this is my first attempt with the new "bundled" tarball.)
I'm building it with:
$ python setup.py CORE_ONLY=1 IN_CVS_TREE=1 build --debug
Other info:
gcc-2.95.3
glib-1.2.10
gtk+-1.2.10
wxGTK-2.3.4
Python 2.0.1 {I have 2.1.3 & 2.2.2 also, but haven't tried those yet}
Frank McIngvale wrote:
> Hi, I'm getting an error when compiling wxPython-2.3.4.2 vs
> wxGTK-2.3.4. I didn't see this in the archive:
>
> ------------------
> src/gtk/misc2.cpp: In function `struct PyObject * _wrap_wxSafeYield(PyObject *, PyObject *, PyObject
> *)':
> /usr/X11R6/include/wx/utils.h:373: too many arguments to function `bool wxSafeYield(wxWindow * = 0)'
>
> -------------------
>
> I'm compiling vs. my installed version of wxGTK, not the bundled
> version - is that bad/unsupported?
Usually it would be no problem, but this is something that was added
after 2.3.4 so you'll need to use the bundled wxGTK to get it to compile
right.
Thanks! Now that I think about it, I'm just going to use the bundled
version as my system-wide version (I'm not concerned with binary
compatibility). One less tarfile to keep around
Hi, I have a widget written in C++ that I'm trying to
use from wxPython. I'm playing with dllwidget to see
if that will work, but I'm not clear on how (or if?)
wxPython can see the custom events it generates.
(The code works fine in C++, so I'm just showing
the outline above to make it clear what I'm asking.)
Is it possible for me to catch MY_EVENT from within
wxPython? Can I do it with dllwidget, or is SWIG required,
or ... ? I've looked on google, etc., without any luck.
Does anyone have a sample showing how this is done?
Hi, I have a widget written in C++ that I'm trying to
use from wxPython. I'm playing with dllwidget to see
if that will work, but I'm not clear on how (or if?)
wxPython can see the custom events it generates.
[...]
Is it possible for me to catch MY_EVENT from within
wxPython? Can I do it with dllwidget,
No. Dllwidget is okay for quick and dirty integrations, but it can't handle event types that wxPython doesn't already know about.
or is SWIG required,
To do the level of integration that you are looking for, Yes. More specifically, my version called wxSWIG (a hacked up version of SWIG 1.1p5-883) which is located in wx CVS at wxWindows/wxPython/wxSWIG.
or ... ? I've looked on google, etc., without any luck.
Does anyone have a sample showing how this is done?
Probably the easiest thing to do is to copy wxPython/contrib/gizmos/ change names as appropriate and use it as a starting point.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Frank McIngvale wrote:
> Hi, I have a widget written in C++ that I'm trying to
> use from wxPython. I'm playing with dllwidget to see
> if that will work, but I'm not clear on how (or if?)
> wxPython can see the custom events it generates.
>
[...]
>
> Is it possible for me to catch MY_EVENT from within
> wxPython? Can I do it with dllwidget,
No. Dllwidget is okay for quick and dirty integrations, but it can't
handle event types that wxPython doesn't already know about.
I was afraid of that! Ok, thanks for the reply - that saved
me a lot of time trying.
Probably the easiest thing to do is to copy wxPython/contrib/gizmos/
change names as appropriate and use it as a starting point.
Whew ... that's a little over my head for now What I'm trying to do
is reuse a big chunk of drawing code, so what I've decided to do is refactor
my code and pass wxDC's from python to C++ (using SWIG_GetPtrObj()) and
do the event handling all on the python side. It's working great so far!